How do I redo an undone change in Vim?
<C-r>
The (Ctrl+r) command redoes the last change that was undone with u.
<C-r>
The (Ctrl+r) command redoes the last change that was undone with u.
gqip
The gqip command reformats the current paragraph to fit within the configured textwidth.
r{char}
The r{char} command replaces the character under the cursor with {char} without ever entering insert mode.
10@a
The 10@a command replays the macro recorded in register a exactly 10 times.
gv
The gv command reselects the exact same area that was last selected in visual mode.
<C-w>+ and <C-w>-
The + and - commands increase or decrease the height of the current split window by one line.
:'<,'>normal @a
The :'normal @a command executes the macro stored in register a on every line within the current visual selection.
:!command
The :!command syntax lets you execute any shell command directly from within Vim without leaving the editor.
<C-d>
The (Ctrl+d) command scrolls the window down by half a screen, moving both the viewport and the cursor.
<C-u>
The (Ctrl+u) command scrolls the window up by half a screen, moving the cursor along with it.
:s/old/new/g
The :s/old/new/g command replaces all occurrences of old with new on the current line only.
?pattern
The ?pattern command searches backward through the file for the given pattern, starting from the cursor position and wrapping around to the end of the file if n
$
The $ command moves the cursor to the last character of the current line.
^
The ^ command moves the cursor to the first non-blank character of the current line.
<C-w>T
The T (Ctrl+w then Shift+t) command moves the current split window into a new tab page.
buffers-windows #buffers-windows #windows #tabs #normal-mode
gd
The gd command jumps to the local definition of the word under the cursor.
:bnext
The :bnext (or :bn for short) command switches to the next buffer in Vim's buffer list.
:tabnew filename
The :tabnew filename command opens a file in a new tab page in Vim.
buffers-windows #buffers-windows #tabs #ex-commands #navigation
O
The O (uppercase) command opens a new blank line above the current line and places you in insert mode, ready to type.
o
The o command opens a new line below the current line and places you in insert mode, ready to type.