vim-abolish icon indicating copy to clipboard operation
vim-abolish copied to clipboard

Negative lookahead in subvert

Open isobit opened this issue 7 years ago • 1 comments

Is it possible to do negative lookahead with the subvert command? Say I want to replace foo with quux but leave foobar alone- is there a way to get this to work?

Here was my attempt:

File:

foo
foobar

Command: :%S/foo\(bar\)\@!/quux/g Result: E486: Pattern not found...

isobit avatar Sep 26 '16 21:09 isobit