How do I paste text from the system clipboard into Vim?
"+p
The "+p command pastes the contents of the system clipboard into Vim.
870 results for "it at"
"+p
The "+p command pastes the contents of the system clipboard into Vim.
<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
:tjump {name}
Vim's :tjump is the smarter sibling of :tag and :tselect.
:earlier 1f
The :earlier {count}f command navigates Vim's undo tree to the state of the buffer at the time of the last (or Nth) file write.
qqqqqq{edits}@qq
A recursive macro calls itself at the end of its sequence, creating a loop that automatically repeats until a motion or command fails (such as hitting the last
":p
The : register holds the most recently executed Ex command.
registers #registers #ex-commands #normal-mode #productivity
gq{motion}
The gq{motion} operator reformats text to fit within Vim's textwidth setting, inserting hard line breaks where lines are too long.
g+
Vim's undo history is a tree, not a linear stack.
: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.
:changes
How it works Vim maintains a change list that records the position of every change you make to a buffer.
<C-r><C-r>x
When you press x in insert mode to paste a register, Vim inserts the text "as if you typed it" — meaning autoindent, textwidth, and other insert behaviors can
nnoremap <expr> j (v:count == 0 ? 'gj' : 'j')
The map modifier turns a mapping's right-hand side into a Vimscript expression that is evaluated at the time the key is pressed, with its return value used as t
/<C-r>0
How it works After yanking text, you can use it directly as a search pattern by inserting the yank register contents into the search prompt.
<C-o>
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
<C-v>jj"ay then "ap
How it works Vim registers remember not just the text content but also the type of selection that was used to yank it: characterwise, linewise, or blockwise.
:wincmd
:wincmd {key} executes any {key} window command from the Ex command line or from inside a Vimscript function.
:set backupdir=~/.vim/backup// directory=~/.vim/swap//
How it works By default, Vim creates backup files (ending in ~) and swap files (ending in .
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.
:set cmdheight=2
The cmdheight option controls how many lines Vim reserves for the command-line area at the bottom of the screen.
g; / g,
The g; and g, commands let you navigate Vim's changelist — a per-buffer history of every position where you made a change.
navigation #navigation #changelist #editing #normal-mode #marks