Vim--filter Commands

Source: Internet
Author: User

The command is also called motion



: Help!


Filter commands


Information Filtering (filter)

!==>tell vim to performing a filter operation

!5G, from the cursor down 5 lines to execute the filter program (tell the VIM to start filter under cursor and go down 5 lines)

:.,. +4!


: 10,15!sort-I only executes between lines 10th and 15th of the file (sort between line ten to 15)

!! (Filter the current line)

:., $!sort (sort from current line to end)


!! Date, insert current time (insert present date)




A filter is a program this accepts text at standard input, changes it in some

The, and sends it to standard output. can use the commands below to send

Some text through a filter, so, it's replace by the filter output.

Examples of filters is "sort", which sorts lines alphabetically, and

"Indent", which formats C program files (you need a version of the indent that

Works like a filter;  Not all versions does). The ' shell ' option specifies the

Shell Vim uses to execute the filter command (see also the ' Shelltype '

option).  You can repeat the filter commands with ".". Vim does not recognize a

Comment (Starting with ' "') after the":! "command.




:! Directly run an external command in the shell (call any external program)


Vim--filter Commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.