Find the next occurrence of a variable in vim

If you have the cursor over the variable in question, you can press * and it will search for the next occurrence or # will search for the previous one.

This is equivalent to typing:

/\<n\>

(\< matches on the start of a word and \> matches on the end of word). The only difference (for reasons I’m not sure of) is that * and # don’t pay attention to the 'smartcase' option.

See:

:help *
:help /\<

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)