Sunday, May 29, 2011

Re: highlight all words matching the word under the cursor

On 05/29/2011 11:31 AM, Reuven Sayag wrote:
> Hi,
> I'm looking for a way to highlight words that match the word under the
> cursor.
> I tried to put in my vimrc the following:
> :autocmd CursorMoved *.cc,*.h,*.java exe printf('match IncSearch /\<%s
> \>/', expand('<cword>'))
>
> This works but it's a bit slow, and I don't really need it all the
> time, Can someone add some info about how to toggle this behavior on a
> function key (or a<Leader> h)?

Maybe have a look at the Mark plugin:
http://www.vim.org/scripts/script.php?script_id=1238

I think it does exactly what you want. I use it every day and it's
really nice.

Jeroen

--
website: http://budts.be/ - twitter: @teranex
___________________________________
Registered Linux User #482240 - GetFirefox.com - ubuntu.com

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: