How do I set the tab width in Vim?
:set tabstop=4 shiftwidth=4 expandtab
The :set tabstop=4 shiftwidth=4 expandtab command configures Vim to use 4-space indentation with spaces instead of tab characters.
210 results for "insert mode"
:set tabstop=4 shiftwidth=4 expandtab
The :set tabstop=4 shiftwidth=4 expandtab command configures Vim to use 4-space indentation with spaces instead of tab characters.
<C-v>
The (Ctrl+v) command enters visual block mode, which lets you select a rectangular column of text across multiple lines.
dap / dip
The dap and dip commands use Vim's paragraph text objects to delete an entire block of contiguous text in a single motion.
editing #editing #text-objects #normal-mode #delete #motions
:bufdo normal @a
The :bufdo command executes an Ex command in every open buffer, and when combined with :normal @a, it replays macro a across all of them.
macros #macros #buffers #ex-commands #automation #productivity
S"
The vim-surround plugin provides the S command in visual mode to wrap any selection with a delimiter pair.
"{register}y{motion}
Vim has 26 named registers (a-z) that act as independent clipboards.
registers #registers #editing #normal-mode #yank #productivity
:set relativenumber
The :set relativenumber command displays line numbers relative to the cursor position instead of absolute line numbers.
ciw""<Esc>P
Vim doesn't have a built-in "surround" operator, but you can wrap any word in quotes or brackets with a short sequence: ciw""P.
editing #editing #text-objects #normal-mode #productivity #surround
ii / ai
The vim-indent-object plugin by Michael Smith adds text objects based on indentation level, giving you ii (inner indent) and ai (an indent) to select, delete, c
cin)
The targets.