Use * to Seach for the word under the cursor in vim

This might be my new favorite vimism.
The idea that there is a single character shortcut for searching for the character under the cursor is brilliant, and something I will use, quite a bit, in my day to day work. It might be more powerful than tags.

2 thoughts on “Use * to Seach for the word under the cursor in vim

  1. Heya Adam,

    * searches forward for the word under the cursor
    # searches backward for the word under the cursor

    Simply hit the character again to move to the next/previous occurence.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.