Search This Blog

Monday, March 26, 2007

search for one word and exclude another word in vim

In vim, to find all the lines containing the word 'condition' (without the quotes) and to exclude those lines containing 'condition number', install the LogiPat plugin available at http://vim.sourceforge.net/scripts/script.php?script_id=1290

The sample command looks like

:LP "condition" & !"condition_number"

Related links
  • Download and installation instructions http://vim.sourceforge.net/scripts/script.php?script_id=1290
  • LogiPat on Author's homepage http://mysite.verizon.net/astronaut/vim/index.html#LOGIPAT
  • Discussion on vim mailing list http://tech.groups.yahoo.com/group/vim/message/78897

No comments:

Blog Archive

Followers