On Fri, Jan 25, 2013 at 10:21 AM, skyworld <[email protected]> wrote:

> Hi,
>
> does vi has a fuction like "grep -v"? I always found I need to seach
> within the file with those lines which exclue specific strings.
> Thanks.
>

Searching in vim is done with regular expressions, so I believe this is
possible.  For example, to search for lines with do not include "string"

    /^\(\(.*string.*\)\@!.\)*$

See here:

http://vim.wikia.com/wiki/Search_for_lines_not_containing_pattern_and_other_helpful_searches


-- 
Aaron Webster

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php



Reply via email to