How do I access the last Ex command I ran?
":
The : register contains the last Ex command that was executed.
225 results for "paste"
":
The : register contains the last Ex command that was executed.
"/ register
The / register contains the most recent search pattern.
"# register
The # register contains the name of the alternate file — the previously edited file in the current window.
oil.nvim: edit directory listing like a buffer
oil.
".
The .
qa f,ldt,F(p q
This macro swaps two comma-separated arguments inside parentheses by cutting the second argument and placing it before the first.
:let @b = @a
The :let @b = @a command copies the contents of register a into register b.
`[ and `]
The ` [ ` and ] ` marks automatically track the boundaries of the last changed or yanked text.
: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.
"=strftime('%Y-%m-%d %H:%M')<CR>p
The expression register lets you evaluate Vimscript on demand and paste the result immediately.
registers #registers #expression-register #automation #timestamps
{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.