Searches
|
Command |
Action |
|
/ |
Search forward for |
|
/ |
Repeat previous search forward. |
|
/ |
Go to line |
|
? |
Search backward for |
|
? |
Repeat previous search backward. |
|
? |
Go to line |
|
n |
Repeat previous search. |
|
N |
Repeat previous search in opposite direction. |
|
% |
Find match of current parenthesis, brace, or bracket. |
|
* |
Search forward for word under cursor. Matches only exact words. (vim) |
|
# |
Search backward for word under cursor. Matches only exact words. (vim) |
|
g* |
Search backward for word under cursor. Matches the characters of this word when embedded in a longer word. (vim) |
|
g# |
Search backward for word under cursor. Matches the characters of this word when embedded in a longer word. (vim) |
|
f |
Move forward to |
|
F |
Move backward to |
|
t |
Move forward to just before |
|
T |
Move backward to just after |
|
, |
Reverse search direction of last f, F, t, or T. |
|
; |
Repeat last character search (f, F, t, or T). |
|
:noh |
Suspend search highlighting until next search. (vim). |
Line numbering
|
Command |
Action |
|
Ctrl-G |
Display current filename and line number. |
|
gg |
Move to first line in file. (vim) |
|
|
Move to line number |
|
G |
Move to last line in file. |
|
: |
Move to line number |
Marking position
|
Command |
Action |
|
m |
Mark current position with character |
|
' |
(backquote) Move cursor to mark |
|
' |
(apostrophe) Move to start ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access