How do I paste my last Ex command into the command line or a buffer?
<C-r>:
Vim stores your last executed Ex command in the read-only : register.
370 results for "insert mode"
<C-r>:
Vim stores your last executed Ex command in the read-only : register.
<C-x><C-o>
The keystroke triggers omni completion, Vim's built-in language-aware completion system.
<C-v>$A
When you need to append text to the end of several lines that have different lengths, visual block mode with $ is the key.
<C-x><C-n>
triggers keyword completion that searches only the current buffer for matches, scanning forward from the cursor.
". / "% / ": / "# registers
Vim has four read-only special registers that automatically contain useful contextual information.
registers #registers #special-registers #workflow #productivity
<C-r>=input('Enter: ')<CR>
By embedding =input('prompt: ') inside a recorded macro, you can pause the macro at any point to ask for user input and insert the result.
:set infercase
The infercase option makes Vim's keyword completion smart about capitalization: it adapts each match to reflect the casing of the characters you've already type
:set commentstring=//\ %s
The commentstring option controls the template Vim uses to represent commented-out lines.
:set paste
The :set paste command enables paste mode, which temporarily disables auto-indentation, smart tabs, and other insert-mode features that can mangle text pasted f
<C-r>.
In insert mode, .
:set timeoutlen=300 ttimeoutlen=10
If key mappings feel laggy, many users reduce timeoutlen and stop there.
config #config #mappings #terminal #performance #insert-mode
:set complete=.,w,b,t
Default keyword completion can feel noisy in large projects because Vim may scan extra sources you do not care about in the moment.
gR
gR enters Virtual Replace mode, a smarter variant of Replace mode (R) that replaces characters based on screen columns rather than raw bytes.
vim.snippet.expand()
Neovim 0.
<C-r>=expand('%:t')<CR>
In insert mode, = opens the expression register.
<C-v>jj$A text<Esc>
Visual block mode combined with $A lets you append text to the end of multiple lines simultaneously, even when those lines have different lengths.
visual-mode #editing #visual-mode #block-mode #productivity #insert-mode
[<Space> and ]<Space>
vim-unimpaired (by Tim Pope) provides paired bracket mappings for dozens of common operations.
:nnoremap / :inoremap / :vnoremap
Vim has two types of key mappings: recursive (:map, :nmap, :imap) and non-recursive (:noremap, :nnoremap, :inoremap).
cc
The cc command deletes the entire content of the current line (preserving indentation) and enters insert mode.
ci`
The ` ci ` command changes the text inside backtick delimiters.