To search forward in Vim for cake
, I'd type /cake
, but the cursor jumps to the first match when I press return. Is there a Vim command analogous to "find next"?
“Find next” in Vim
editingvim
Related Topic
- Vim clear last search highlighting
- Your most productive shortcut with Vim
- Regex – How to make the match non greedy in vim
- What’s a quick way to comment/uncomment lines in Vim
- How to do case insensitive search in Vim
- How does the vim “write with sudo” trick work
- How to move screen without moving cursor in Vim
- How to exit the Vim editor
Best Answer
It is n for next and N for previous.
And if you use reverse search with
?
(for example,?cake
) instead of/
, it is the other way round.If it is installed on your system, you should try to run
vimtutor
command from your terminal, which will start a tutorial of the basic Vim commands.Rob Wells advice about * and # is also very pertinent.