How do I jump to the start or end of the text I last yanked or changed?
`[ and `]
The ` [ ` and ] ` marks automatically track the boundaries of the last changed or yanked text.
161 results for "paste"
`[ and `]
The ` [ ` and ] ` marks automatically track the boundaries of the last changed or yanked text.
<C-r>{reg} in command line
While on the : command line, pressing followed by a register name inserts that register's contents.
:redir @a | {cmd} | redir END
The :redir command redirects the output of Ex commands to a register, file, or variable instead of displaying it on the screen.
command-line #command-line #ex-commands #registers #productivity #advanced
qaciw"<C-r>""<Esc>wq
This macro wraps the current word in double quotes by changing the word, inserting quotes around the original content, and moving to the next word.
:enew | setlocal buftype=nofile bufhidden=wipe noswapfile
A scratch buffer is a temporary, unnamed buffer that exists only in memory — it won't prompt you to save when you close it and leaves no trace on disk.
buffers-windows #buffers #editing #ex-commands #productivity #workflow
q:
The command-line window is a special buffer that shows your entire Ex command history and lets you edit entries using the full power of Vim's normal mode before
command-line #command-line #ex-commands #history #editing #productivity
"+q{keys}q
You can record macros into any register, including the system clipboard (+).
C
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
"ayi(
Combining named registers with text object motions lets you precisely yank structured content — like function arguments, quoted strings, or bracketed expressi
visual select + d, move, P
To swap two pieces of text, delete the first selection, navigate to the second, select it, and paste.
D
The D command deletes everything from the cursor position to the end of the current line.
{count}{motion}
Almost every Vim motion and operator accepts a numeric count prefix that repeats or amplifies the action.
:nnoremap <leader>d "=strftime('%Y-%m-%d')<CR>p
The expression register (=) evaluates Vimscript expressions and uses the result as register content.
:put =map(getreg('a', 1, 1), 'toupper(v:val)')
By using getreg() with the list flag and applying map(), you can transform register contents with any Vimscript function before pasting.
:move +1 / :move -2
The :move command relocates lines to a specific position without using delete and paste.
80i-<Esc>
Vim's insert commands accept a count prefix that repeats everything you type.
: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
<C-a> (in insert mode)
While in insert mode, pressing re-inserts whatever text you typed during your previous insert session.
=i{
When editing code with messy indentation — after a paste, a merge conflict, or a refactor — you often need to fix just one block rather than the entire file
:let @a = substitute(@a, 'old', 'new', 'g')
After recording a macro or yanking text into a named register, you may need to tweak it — fix a typo in a recorded macro, change a variable name in yanked tex