On 05/10/2011 11:51 AM, cyboman wrote:
does anybody know how to do search of lines that don't contain a
pattern:

/pattern

searches for a occurrence of a pattern, but i need a way to search for
lines that don't have a pattern.

You can use

  /^\%(\%(pattern\)\@!.\)*$

or if you're performing an Ex action on them, you can use

  :v/pattern/action

instead of

  :g/pattern/action

Lastly, you might want to check out Dr. Chip's LogiPat.vim script/plugin that makes this a lot less messy to type.

-tim



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