How do I visually select from the cursor to the matching bracket or parenthesis?
v%
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
216 results for "= motion"
v%
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
<C-a> (insert mode)
While in insert mode, pressing re-inserts the exact text you typed during your previous insert session.
= (in visual mode)
After making a visual selection, pressing = applies Vim's auto-indent to every selected line at once.
:g/^./,/^$/join
The :g/^.
command-line #command-line #editing #global #formatting #paragraphs
=i{ or =ap
The = operator performs smart indentation based on Vim's filetype-aware indent rules.
:'<,'>norm I//
After making a visual selection, :norm {commands} executes normal-mode keystrokes on every line in the range.
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
vip=
Pressing = in visual mode re-indents all selected lines according to the current filetype's indent rules — the same engine used by == for a single line, but a
visual-mode #visual-mode #indentation #editing #text-objects
:let @q = substitute(@q, 'foo', 'bar', 'g')
Recorded macros are plain text stored in registers, which means you can refactor them instead of re-recording from scratch.
va"
Vim's text objects let you select structured regions of text with two-keystroke shortcuts.
=ip
The =ip command combines Vim's auto-indent operator (=) with the inner paragraph text object (ip) to re-indent every line in the current paragraph in a single k
ysiwf
vim-surround's f and F surrounds let you wrap any text object inside a function call, prompting you for the function name.
gm
The gm command moves the cursor horizontally to the middle of the current screen width on the current line.
"-
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
<C-v>jjlU
Visual block mode lets you select rectangular regions of text, which means you can target a specific column and apply case changes only to that area.
[m
The [m motion jumps backward to the start of the nearest enclosing or preceding method definition.
vim-matchup
The vim-matchup plugin by Andy Massimino is a drop-in replacement for Vim's built-in matchit plugin that supercharges the % key to work with language-specific k
plugins #plugins #matchup #navigation #text-objects #matching
V]}
Pressing V]} in normal mode enters visual line mode and immediately extends the selection to the next unmatched closing brace }.
visual-mode #visual-mode #navigation #text-objects #editing #motions
:set equalprg=gofmt
By default, Vim's = operator re-indents text using its internal rules.
config #config #editing #ex-commands #formatting #indentation
[{ and ]}
The [{ motion jumps to the previous unmatched { — the opening brace of the block enclosing your cursor.