How do I delete characters, words, and lines without leaving insert mode?
<C-h> / <C-w> / <C-u>
Vim provides three levels of deletion directly in insert mode, so you don't need to switch to normal mode for small corrections.
953 results for ":normal"
<C-h> / <C-w> / <C-u>
Vim provides three levels of deletion directly in insert mode, so you don't need to switch to normal mode for small corrections.
:windo / :bufdo / :tabdo {command}
Vim's do commands iterate over collections and execute a command in each context.
buffers-windows #buffers #windows #tabs #batch-editing #ex-commands
:keepjumps {cmd}
:keepjumps is a command modifier that suppresses any jump list updates caused by the command that follows it.
:verbose map <key> or :verbose set option?
The :verbose prefix shows where a mapping, setting, command, or function was defined — which file and line number.
command-line #command-line #debugging #config #mappings #workflow
:echo getregtype('a')
The getregtype() function returns the motion type of a register's content — whether it was yanked characterwise, linewise, or as a visual block.
:ilist /pattern/
The :ilist command searches for a pattern not only in the current buffer but also in files referenced by #include directives (or whatever 'include' is set to).
<C-y> and <C-e>
In Insert mode, copies the character at the same column position from the line above the cursor, and copies the character from the line below.
z{N}<CR>
The z{N} command sets the current window's height to exactly N lines and simultaneously positions the current line at the top of the window.
set statusline=%{MyCustomFunc()}
How it works Vim's statusline supports the %{expr} syntax which evaluates a Vimscript expression and displays the result.
vim.lsp.buf.format()
Neovim's built-in LSP client exposes vim.
Record worker macro in @b, call it from @a with @b
Complex macros are hard to debug and maintain when crammed into a single register.
<C-x> / <C-v> / <C-t> (in Telescope)
When browsing results in a Telescope picker, you are not limited to opening selections in the current window.
CursorHold
The CursorHold autocommand event fires once whenever the cursor has been motionless in normal mode for updatetime milliseconds.
: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.
<C-f>
While typing in Vim's command line (after pressing :), pressing opens the command-line window with your current, unfinished command already filled in.
<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
<C-x><C-e> and <C-x><C-y>
While in insert mode, scrolls the window up one line and scrolls it down one line — all without leaving insert mode.
<C-a> in insert mode
Pressing while in insert mode inserts the same text that was typed during the previous insert mode session.
"%p
The % register in Vim always contains the name of the current file.
registers #registers #editing #insert-mode #productivity #filename
:verbose set option?
The :verbose prefix shows where an option was last set (which file, which line).