Find 1. Quick Find
Enter Normal mode /
and then type the string you want to find and press ENTER to find it. ?
is the same as the /
function, but ?
looks up and /
down. After entering the lookup, the input n
and N
can continue to find n
the expression to continue the lookup, N
reverse Lookup
2. Quick Find Exercises
Use VIM to open a file for editing
$ vim protocols
- Normal mode input
/icmp
find string ICMP
- Normal mode Enter to
n
find the next ICMP
- Normal mode input
?tcp
up lookup string TCP
- Normal mode input
N
to find the last occurrence of TCP
3. Advanced Search
- Enter
\*
a word in normal mode to find where the cursor is located
- In normal mode, enter the same as
\#
above, but \#
forward (up), it \*
is backward (bottom) to find
- Normal mode
g\*
\*
, but partially matches the word
- Normal mode
g\#
\#
, but partially matches the word
Search for n
The above, N
continue to find command can still be used
Vim Quick Find