VIM + Linux + ctags + taglist + winmanager + grep + cstab + supertab + visualmark-grep

Source: Internet
Author: User
Tags egrep

1 download: http://www.vim.org/scripts/script.php? Script_id = 1, 311
2. decompress the grep. Vim file to the/usr/share/Vim/vim70/plugin folder.
3. Help: In the grep. Vim File Header
4 usage:
The following describes its usage:
Vim has its own search function, but it is still a little different from the grep in shell. Sometimes when coding is in a rush, I really want to press F3,
The words where the cursor is located have a full range of engineering grep, so you don't have to think about tedious commands. Now the gospel is coming, there are not a few people who are as lazy as me,
You can find instructions at the front of the grep. Vim script:
: Grep searches for the specified file according to the specified rules.

: Rgrep is the same as above, but it is recursive grep.
: Grepbuffer search in all opened Buffers

: Bgrep same as above

: Grepargs: Find in argument filenames (: ARGs) of VIM
: Fgrep run fgrep
: Rfgrep run recursive fgrep
: Egrep run egrep
: Regrep run recursive egrep
: Agrep run agrep
: Ragrep run recursive agrep

The preceding command is called like this:
: Grep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Rgrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Fgrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Rfgrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Egrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Regrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Agrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Ragrep [<grep_options>] [<search_pattern> [<file_name (s)>]
: Grepbuffer [<grep_options>] [<search_pattern>]
: Bgrep [<grep_options>] [<search_pattern>]
: Grepargs [<grep_options>] [<search_pattern>]

But I never need to knock on the ^ _ ^ of the above commands, because I am ~ /. The following sentence is added to vimrc:
Nnoremap <silent> <F3>: grep <CR>

But I never need to knock on the ^ _ ^ of the above commands, because I am ~ /. The following sentence is added to vimrc:

Nnoremap <silent> <F3>: grep <CR>

For example, if you want to find "feat_quickfix" in/home/wooin/vim71/src/Main. C, move the cursor to "feat_quickfix" and press the F3 key, for example:

The following command lines are displayed:

Search for pattern: feat_quickfix

Now you can edit the row. grep supports regular expressions. If you want to match the entire word, you can change it:

Search for pattern: \ <feat_quickfix \>

Press Enter:

The following command lines are displayed:

Search in files :*

You are asking about the search scope. By default, all files in the directory are used. You can edit this line. For example, you only want to search for the source file:

Search in files: *. C *. h

Press enter to list all matching search results in the pop-up quickfix window. You can search for the desired results in the pop-up window, such:

 

From: http://blog.csdn.net/wooin/archive/2007/10/31/1858917.aspx

 

 

 

 

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.