How do I move the cursor to the middle of the visible screen?
M
The M command moves the cursor to the line in the middle of the current window.
M
The M command moves the cursor to the line in the middle of the current window.
L
The L command moves the cursor to the last line visible in the current window.
}
The } motion moves the cursor forward to the next blank line, effectively jumping to the next paragraph.
)
The ) motion moves the cursor to the beginning of the next sentence.
m{a-z} then '{a-z}
Vim marks let you bookmark positions in a file and jump back to them instantly.
{
The { motion moves the cursor backward to the previous blank line, jumping to the beginning of the current or previous paragraph.
ge
The ge motion moves the cursor backward to the end of the previous word.
<C-o> and <C-i>
Vim maintains a jump list of positions you have visited.
F{char}
The F command moves the cursor backward to the previous occurrence of a specified character on the current line.
/<C-r>0
How it works After yanking text, you can use it directly as a search pattern by inserting the yank register contents into the search prompt.
/\%>5c\%<20cpattern
How it works Vim's search patterns support column position constraints using the \%c family of atoms.
"add
How it works When you delete text in Vim with commands like dd, dw, or x, the deleted text goes into the unnamed register and the numbered registers (1-9).
\zs and \ze
How it works Vim's \zs (set start) and \ze (set end) atoms let you define which portion of a pattern counts as the actual match, even though the full pattern is
:m {address}
How it works The :m command (short for :move) moves one or more lines to after the specified address.
[I
How it works The [I command searches the current file (and included files) for the word under the cursor and displays a list of all matching lines with their li
:t {address}
How it works The :t command (short for :copy) copies one or more lines and places them below the specified address.
"ayy "byy "cyy
How it works Vim provides 26 named registers (a through z) that you can use as independent clipboards.
\d \w \s \a \l \u
How it works Vim provides shorthand character classes that save you from writing out full bracket expressions.
yiw
How it works The command yiw yanks (copies) the inner word under the cursor.
.\{-}
How it works In most regex engines, ? or +? make quantifiers non-greedy (matching as little as possible).