While pairing a coworker remarked that I’m able to jump around in vim quite
quickly. While I use a number of techniques to jump around, including
rails-vim A, R and their family. I
came up with a variation on the ever handy
*. Using the star
will jump to the next occurrence of the word under the cursor. This jump
jump is limited to the current file. I thought it might be handy to
have a leader command to quickly be able to
<cword> (the word
under the cursor).
The above in my
.vimrc allows me to hit leader star to Ggrep for the word
under the cursor. Ggrep, in all of it’s awesomeness uses the quickfix window for
results. Quickfix navigation options like :cnext and :cprev can be used. I use
the unimpaired plugin provides
[q to traverse through the list of hits.
I hope this trick proves to be as useful for others as it has for myself.