How do I select the contents inside curly braces?
vi{
The vi{ command visually selects everything inside the nearest pair of curly braces {}, without selecting the braces themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
vi{
The vi{ command visually selects everything inside the nearest pair of curly braces {}, without selecting the braces themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
vip
The vip command visually selects the inner paragraph — all contiguous non-blank lines surrounding the cursor.
visual-mode #visual-mode #text-objects #editing #normal-mode
ma and 'a
The ma command sets a mark named a at the current cursor position.
:set relativenumber
The :set relativenumber command displays line numbers relative to the cursor position instead of absolute line numbers.
<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.
<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.
?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.
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.
P
The P (uppercase) command pastes the contents of the default register before the cursor position.