13.Search
Let's learn how to search inside Vim.
Tip 80. Meet the Search Command
In this tip, we’ll cover the basics of using the search command, including how to specify the direction of a search, repeat (or reverse) the last search, and work with the search history.
/search forward?search backward
| Command | Effect |
|---|---|
n | Jump to next match, preserving direction and offset |
N | Jump to previous match, preserving direction and offset |
/<CR> | Jump forward to next match of same pattern |
?<CR> | Jump backward to previous match of same pattern |
gn | Enable character-wise Visual mode and select next search match |
gN | Enable character-wise Visual mode and select previous search match |