In Vim, how do I match on "=" but not on "=="?
I've tried a number of different search patter开发者_如何学Pythonns:
[^=]=[^=]
works but only if = is not at the beginning/end and it also matches the sandwiching characters=\@!==\@!
seems like it should work because \@! matches nothing but requires a match, but it doesn't (see :help pattern-overview)[^=]\@==[^=]\@=
also doesn't but seems like it should
Suggestions?
Ah hah: =\@<!==\@!
How about
[^=]\?\zs=\ze[^=]\?
\zs starts the match \ze ends the match
精彩评论