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.
1031 results for "i" a""
<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.
ma and 'a
The ma command sets a mark named a at the current cursor position.
:set belloff=all
The belloff=all option disables all error bells and visual bells in Vim.
"/p
Vim stores the last search pattern in the search register "/.
<C-w>^
Vim tracks the alternate buffer — the last file you were editing before the current one.
<C-r><C-a>
When you are in command-line mode, inserts the word under the cursor (alphanumeric and _ only).
:.!{cmd}
:.
/pattern1\_.*pattern2
Vim's \ modifier makes any character class match newlines too.
:'<,'>s/\n/, /g
Vim's J command joins lines with a single space, but sometimes you need a custom separator like a comma, pipe, or semicolon.
editing #editing #ex-commands #visual-mode #substitution #lines
:read !date
The :read !{command} syntax runs a shell command and inserts its output below the current line.
:history
:history displays a numbered list of your recently entered Ex commands, giving you a full audit of what you have run in the current session (and across sessions
<C-v>
The (Ctrl+v) command enters visual block mode, which lets you select a rectangular column of text across multiple lines.
:g/pattern/m $
The :g (global) command combined with :m (move) lets you collect all lines matching a pattern and relocate them to a specific position in the file.
command-line #ex-commands #editing #global #search #formatting
:breakadd func {funcname}
Vim has a built-in debugger for Vimscript that most users never discover.
:registers
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
:tag /pattern
When working with ctags, you typically jump to exact tag names with .
:setlocal nobuflisted
Setting nobuflisted removes a buffer from the :ls output and buffer-switching commands like :bnext/:bprev, while keeping it loaded and accessible.
buffers-windows #buffers-windows #buffers #unlisted #management
ga
The ga command displays the ASCII/Unicode value of the character under the cursor in decimal, hexadecimal, and octal.
editing #editing #unicode #debugging #normal-mode #inspection
"{register}y{motion}
Vim has 26 named registers (a-z) that act as independent clipboards.
registers #registers #editing #normal-mode #yank #productivity
:syntax sync fromstart
Vim's syntax highlighting engine does not always parse the entire file from the beginning — it uses sync points to determine where to start parsing for the vi