How do I use marks to define a range for Ex commands?
:'a,'b s/old/new/g
Marks can be used as range specifiers in any Ex command.
command-line #marks #command-line #ex-commands #ranges #editing
:'a,'b s/old/new/g
Marks can be used as range specifiers in any Ex command.
command-line #marks #command-line #ex-commands #ranges #editing
gJ
The gJ command joins the current line with the line below it without inserting any space between them.
<C-a> / <C-x>
Pressing increments and decrements the number under or after the cursor.
ga
The ga command displays the ASCII/Unicode value of the character under the cursor in decimal, hexadecimal, and octal.
editing #editing #unicode #debugging #normal-mode #inspection
:g/pattern/m$
The :g (global) command combined with :m (move) relocates all matching lines to a specified destination.
command-line #command-line #ex-commands #global #editing #organization
:'<,'>normal A;
The :normal command executes normal-mode keystrokes on every line in a range.
command-line #command-line #ex-commands #editing #normal-mode #batch-editing
!{motion}command
The ! operator in normal mode pipes text through an external shell command and replaces it with the output.
ci" / ci( / ci{ / ci[ / ci` / ci'
The ci{delimiter} family of commands changes the text inside any matching pair of delimiters.
editing #editing #text-objects #change #delimiters #normal-mode
d2i(
Vim text objects accept a count prefix that lets you target outer layers of nested delimiters.
d<C-v>2j
Vim lets you override the natural type of any motion by pressing v, V, or between the operator and the motion.
editing #editing #motions #visual-mode #advanced #normal-mode
cin)
The targets.
<C-n>
The vim-visual-multi plugin (formerly vim-multiple-cursors) brings VS Code-style multiple cursor editing to Vim.
plugins #plugins #visual-multi #editing #multiple-cursors #refactoring
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
gS / gJ
The splitjoin.
plugins #plugins #splitjoin #editing #refactoring #formatting
cs"'
The vim-surround plugin by Tim Pope lets you change any surrounding delimiter pair with a single cs command.
plugins #plugins #surround #editing #text-objects #normal-mode
ds"
The vim-surround plugin provides the ds command to instantly delete any surrounding delimiter pair.
plugins #plugins #surround #editing #text-objects #normal-mode
S"
The vim-surround plugin provides the S command in visual mode to wrap any selection with a delimiter pair.
ysiw)
The vim-surround plugin provides the ys (you surround) operator to wrap any Vim text object or motion with a delimiter pair.
plugins #plugins #surround #editing #text-objects #normal-mode
ysiw<em>
The vim-surround plugin makes wrapping text in HTML or XML tags effortless.
<Leader>tm
The vim-table-mode plugin by Dhruva Sagar turns Vim into a powerful table editor that automatically formats and aligns table columns as you type.