Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Vim: * to highlight a word, n/C-n to move between them. You need to have the hlsearch option set.


* searches for the word under the cursor and jumps to the next instance (as if you had pressed n). So it's basically what GP asked about (as long as we're talking basic string matching and not symbol matching).

And hlsearch isn't needed at all; that just controls whether or not the word + its search results get highlighted.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: