Friday, December 31, 2010

vim tip: searching for word under cursor

I was motivated to use vim a few years ago, after watching Corey Haines do his number to LCD kata at the Simple Design and Testing Conference (SDTConf). Although I learned the basics while I was in college, I never really tried to progress beyond that until recently.

Now I try to make a habit of whenever I am doing something that just seems like it's the hard way, I'll google it and learn how to do it better.

Today, I was thinking: there has to be a better way to search for things rather than typing "/thing_to_search_for". So I found out how to search for the word under the cursor, which is # for searching backwards, and * for searching forwards.

Hope this helps, and motivates you to keep learning something new everyday.

No comments: