Kamaraju S Kusumanchi wrote:
Hi
I need to search for a word 'condition' (without quotes) and exclude
hits containing 'condition number'.
On a shell I can do
grep -sir condition *F90 | grep -v 'condition number'
How do I do it the vim way?
Sounds like a problem that LogiPat is designed to handle:
:LP "condition" & !"condition number"
would do the trick. If you want to see the pattern, you can use
:echo LogiPat('"condition"&!"condition number"')
which shows
\%(.*condition.*\&^\%(\%(condition number\)[EMAIL PROTECTED])*$\)
You can get LogiPat from my website:
http://mysite.verizon.net/astronaut/vim/index.html#LOGIPAT
or from
http://vim.sourceforge.net/scripts/script.php?script_id=1290
Regards,
Chip Campbell