Saturday, January 26, 2013

Re: does vi has a funtion like "grep -v"?

On Saturday, January 26, 2013 10:34:32 AM UTC-6, ping wrote:
> Why not just use external grep in vim if that's what you want?
>
> :[range]!grep -v
>
>

This will replace all the lines in [range] with the output of !grep. I don't think the OP wanted to DELETE the lines, just find them.

The better way to invoke external grep for searching from Vim is with Vim's :grep command, which invokes 'grepprg' and then populates the quickfix list. 'grepprg' by default just uses grep.

--
--
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

No comments:

Post a Comment