108160Re: How to separate consecutive highlighted matches?
- Oct 1, 2009
> function ToggleHLSearch()As an aside, this can be simplified using the "inv"erse notation
> if &hls
> set nohls
> set hls
> nmap <silent> <C-n> :silent call ToggleHLSearch()<CR>
for any boolean setting, written as either
I use this regularly with 'list' to toggle between set/unset with
":set list!" which is documented in the help at the bottom of the
> But if I have consecutive matches, it is still not easy to see howTo the best of my knowledge, I don't believe you can do this,
> many matches there are. In particular, '\t' can occupy different
> length of spaces, depending the context. Therefore, I would like the
> highlight be nonconsecutive (for example, one pixel with between two
> matches is not highlighted).
especially in non-GUI vim -- character-cells don't have spacing,
and if they did, you'd get gaps between *all* the cells in the
highlighted range. The best I could come up with was to use the
\zs or \ze token in the regexp to tell vim when to start/stop
highlighting to omit the delimiting space/tab character from
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
- Next post in topic >>