How do I programmatically combine or modify the contents of Vim registers?
:let @a = @a . @b
You can manipulate register contents directly using the :let command with the @{reg} syntax.
261 results for ":b#"
:let @a = @a . @b
You can manipulate register contents directly using the :let command with the @{reg} syntax.
<C-w>t and <C-w>b
When managing multiple splits, t jumps to the top-left window and b jumps to the bottom-right window.
/pattern\{-}
The \{-} quantifier in Vim regex matches as few characters as possible, unlike which matches as many as possible (greedy).
b: w: t: s:
Vimscript variables are prefixed with a one-letter scope identifier followed by a colon.
W, B, and E
How it works Vim distinguishes between two types of word objects: A word (lowercase w, b, e) is a sequence of letters, digits, and underscores, or a sequence of
set complete=.,w,b,u,t
The complete option controls which sources Vim scans when you press or for generic keyword completion.
:reg a b c
The :reg (alias :registers) command accepts a string of register names as its argument.
<C-f> to scroll forward, <C-b> to scroll backward
How it works Vim provides two commands for scrolling by an entire screen (page) at a time: Ctrl-F (Forward) scrolls the view one full page down through the file
\{-}
In Vim's regex engine, \{-} is the non-greedy (lazy) quantifier — it matches as few characters as possible, unlike .
:set iskeyword+=-
By default, Vim treats hyphens, dots, and many punctuation characters as word boundaries.
qa{edits}@bq
How it works Vim macros can call other macros, creating a modular system of reusable building blocks.
[e and ]e
The [e and ]e mappings from Tim Pope's vim-unimpaired plugin exchange the current line (or a visual selection of lines) with the line above or below.
yiw{nav}viwp{nav}viwp
When you paste over a visual selection in Vim, the displaced text is moved into the unnamed register "".
registers #registers #visual-mode #editing #text-objects #normal-mode
qa"bpq
While recording macro a, paste from register b with "bp.
:let @+ = @"
Vim's :let @{reg} syntax lets you read from one register and write to another.
set nrformats+=alpha
By default, Vim's and commands only increment and decrement numbers (decimal, hex, binary).
:'<,'>move'>+1 or :'<,'>move'<-2
How it works Vim's :move command lets you relocate lines to a different position.
ddp
The ddp sequence swaps the current line with the line below it.
qa ... j@bj q
You can create macros that call other macros, applying different operations to alternate lines or creating complex editing patterns.
:cnoremap <C-a> <Home>
Vim's command line has limited navigation by default.