How do I insert a Unicode character by its code point in Vim?
<C-v>u{code}
In insert mode, followed by u and a 4-digit hex code inserts the Unicode character with that code point.
Search Vim Tricks
Searching...<C-v>u{code}
In insert mode, followed by u and a 4-digit hex code inserts the Unicode character with that code point.
{N}|
The command (pipe character) moves the cursor to a specific column number on the current line.
Harpoon: mark files and jump with <leader>1-4
Harpoon by ThePrimeagen provides instant access to a curated list of files you're actively working on.
:set incsearch hlsearch
The combination of incsearch and hlsearch gives you live, interactive search highlighting.
<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.
Write keystrokes in buffer, then "qy$
Instead of recording a macro in real-time (where mistakes mean starting over), you can write the keystrokes as text in a buffer, edit them visually, and then ya
macros #macros #editing #registers #workflow #best-practices
q: or <C-f> from : prompt
The command-line window (q:) opens a full Vim buffer containing your Ex command history.
<C-r>=expression<CR>
The expression register ("=) evaluates Vimscript expressions and returns the result.
registers #registers #insert-mode #expression #calculator #vimscript
:g/pattern/cmd1 | cmd2
The :g (global) command can execute multiple Ex commands per matching line by chaining them with .
command-line #command-line #global #ex-commands #batch-editing #advanced
:b partial<Tab>
The :b (buffer) command accepts partial filename matching with tab completion.
gU{motion} / gu{motion} / g~{motion}
Vim has three case operators that work with any motion or text object: gU for uppercase, gu for lowercase, and g~ for toggle case.
editing #editing #case #operators #text-objects #normal-mode
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
~/.vim/after/ftplugin/{filetype}.vim
Vim's after directory (~/.
"#p or <C-r># in insert mode
The # register always contains the name of the alternate file — typically the file you were editing just before the current one.
augroup name | autocmd! | autocmd ... | augroup END
Autocommand groups (augroup) with autocmd! prevent duplicate autocommands from accumulating every time you source your vimrc.
"0p
Register 0 (the yank register) always contains the text from your most recent yank command — and unlike the unnamed register, it is never overwritten by delet
:term then <C-w>N for normal mode
Vim 8+ and Neovim have a built-in terminal emulator that runs inside a buffer.
command-line #command-line #terminal #workflow #productivity
ggVG
While Vim doesn't have a built-in "entire buffer" text object, the ggVG sequence achieves it: go to the first line, enter line-wise visual mode, then select to
:earlier 5m
Vim's :earlier and :later commands let you travel through your undo history using time-based offsets — not just individual changes.
:vimgrep /pattern/g **/*.ext
The :vimgrep command searches for a pattern across multiple files and loads the results into the quickfix list.