thinca / vim-visualstar

star for Visual-mode.
119 stars 5 forks source link

What's the \V doing? #1

Closed niko closed 11 years ago

niko commented 11 years ago

Hi,

thanks for this nice plugin. I have a question though. I couldn't figure out what the \V is doing here:

https://github.com/thinca/vim-visualstar/blob/master/plugin/visualstar.vim#L50

I use your plugin in conjunction with vim-ag and AgFromSearch and the \V interferes with AgFromSearch. I removed the \V from visualstar and it continued to work just as before as far as I can tell. Hence the question… can you help?

Regards, Niko.

thinca commented 11 years ago

\V is very nomagic. See :help /\V. This plugin searches the selected string as plain text, not regexp. \V can escape all regexp character except \\.

And, Vim's regexp differs from Perl's regexp. vim-ag is this? https://github.com/epmatsw/ag.vim/blob/master/plugin/ag.vim#L72 Essentially, this plugin should convert \V. (However, if it tries to do this seriously, it may be very difficult.)

thinca commented 11 years ago

Please close this issue, if satisfactory.

niko commented 11 years ago

Thanks. Indeed that helps.