How do I target outer nested brackets using counted text objects?
d2i(
Vim text objects accept a count prefix that lets you target outer layers of nested delimiters.
2277 results for "@a"
d2i(
Vim text objects accept a count prefix that lets you target outer layers of nested delimiters.
:nnoremap ]b :bnext<CR>
Mapping ]b and [b to :bnext and :bprev creates an intuitive bracket-style navigation for buffers, matching the convention used by unimpaired.
buffers-windows #buffers-windows #navigation #mapping #buffers
<C-f> (in command-line mode)
When you're already on the Vim command line and realize you need complex edits — inserting text from multiple positions, reordering arguments, or referencing
:set showmatch
How it works The :set showmatch option makes Vim briefly jump the cursor to the matching opening bracket when you type a closing bracket.
:set listchars=
The listchars option controls exactly which invisible characters Vim highlights when list mode is active.
gJ
The gJ command joins the current line with the line below it without inserting any space between them.
<C-v>jjA text <Esc>
Enter visual block with , select lines with j, press A to append after the block.
z. and z<CR> and z-
Vim has two parallel sets of scroll commands: the well-known zz, zt, zb which reposition the view without moving the cursor, and the lesser-known z.
y/<C-r>"<CR>
To search for the exact text you have selected in visual mode, yank it and paste it into the search prompt.
set wildmode=lastused
With wildmode=lastused, :b cycles buffers in most-recently-used order instead of alphabetically.
:TSTextobjectSelect @function.outer
The nvim-treesitter-textobjects plugin provides syntax-aware text objects powered by Treesitter's AST parsing.
<C-r>
The (Ctrl+r) command redoes the last change that was undone with u.
/\%5l\%10cpattern
Vim provides position-matching atoms that constrain where a pattern can match based on line numbers, column positions, or virtual columns.
onoremap ih :<C-u>execute "normal! ?^==\+$\r:noh\rkvg_"<CR>
Vim lets you define custom text objects using operator-pending mode mappings (onoremap) and visual mode mappings (vnoremap).
:cabbrev tn tabnew
Command-line abbreviations with cabbrev let you create short aliases for frequently used Ex commands.
command-line #command-line #abbreviation #shortcuts #productivity
<C-k>DG
Vim's digraph system lets you insert special characters by pressing followed by a two-character mnemonic code.
:lvimgrep /pattern/ %
While :vimgrep populates the global quickfix list, :lvimgrep uses the window-local location list instead.
:doautocmd User MyEvent
Vim's User event type lets you define custom events that fire on demand.
<C-w>+ / <C-w>- / <C-w>> / <C-w><
Vim provides keyboard shortcuts to resize split windows without reaching for the mouse.
:call feedkeys("iHello\<Esc>", 'n')
The feedkeys() function injects keystrokes into Vim's input buffer as if the user typed them.