guillermooo/Vintageous — pull request #114 by zeux (2013-02-20 07:54:30+00:00)
Title: Search highlighting support

This patch implements search highlighting for forward slash, n and * commands (also it fixes some of them). Should be straightforward to implement backwards matching using the same code, as long as there is a way to do reverse matching... (I guess we can use the code from VintageousEx).

Note that, unlike Vintage, highlighting is done using regions which makes them independent of selection, matching Vim behavior. I could not find a way to use the same highlight colors that Sublime uses for Ctrl+I so I just used some random scope name...

The search flags are set to IGNORECASE to match Sublime's defaults, might make sense to expose smartcase/ignorecase settings the same way hlsearch is done?

Finally, since there is no native way in Vim to reset highlighting, I added builtin support for a <Esc> remap (http://www.viemu.com/blog/2009/06/16/a-vim-and-viemu-mapping-you-really-cant-miss-never-type-noh-again/). If VintageousEx is allowed to call Vintageous directly, then it should be straightforward to implement :noh natively.