How do I suspend Vim to the background shell and return to it later?
<C-z> / :stop
Pressing in Vim sends it to the background of your shell session — just like suspending any Unix process.
2125 results for "i{ a{"
<C-z> / :stop
Pressing in Vim sends it to the background of your shell session — just like suspending any Unix process.
"#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.
:earlier
Vim's undo history is not just a linear list of changes — it records timestamps too.
c""<Esc>P
Without a surround plugin, you can manually wrap selected text by changing it, typing the delimiters, and pasting the original text back.
:lua require('mini.surround').setup()
mini.
yos, yow, yol, yon, yoh
The vim-unimpaired plugin adds a set of paired bracket mappings, including a powerful family of option toggles.
:lua require('flash').jump()
flash.
let mapleader = ' ' then nnoremap <leader>key command
The leader key is a configurable prefix for your custom key mappings.
:set breakindentopt=shift:2
When breakindent is enabled, wrapped continuation lines are indented to match the start of their logical line.
"1p ... "2p ... "9p
Vim maintains a numbered register history from "1 through "9 that stores your last 9 deletes and changes.
:keeppatterns normal! @q<CR>
When you replay macros from Ex commands, Vim can overwrite @/ (the last search pattern) depending on what the macro does.
/\vTODO:\s*\zs.{-}\ze\s*($|#)
When TODO comments include prefixes, owners, or trailing metadata, a plain search often lands on the wrong part of the line.
> and <
How it works In visual mode, you can shift selected lines to the right or left using the > and to indent them or or shifts the selected lines one shiftwidth to
"=system('git rev-parse --short HEAD')->trim()<CR>p
If you frequently write commit references in notes, code comments, or release docs, you can avoid shell context switches and paste the hash straight from Vim.
M to move to the middle, L to move to the bottom
How it works Vim offers three commands to jump the cursor to specific vertical positions on the visible screen without scrolling: H moves to the top of the scre
K
Pressing K in normal mode runs a lookup program on the word under the cursor.
navigation #navigation #help #documentation #normal-mode #keywordprg
:tabmove +1
:tabmove normally takes an absolute position (:tabmove 0 moves the tab to the far left), but it also accepts relative offsets using + and -.
:set fillchars+=vert:│,fold:·
The fillchars option controls the filler characters Vim uses for various UI elements — window separators, fold fill lines, diff padding, and more.
:keepjumps
When writing scripts or running commands that move the cursor (like :g, :s, or :normal), Vim normally adds each cursor position to the jump list.
:set diffopt+=internal,algorithm:histogram,indent-heuristic
Default diff settings are fine for small edits, but they can produce noisy hunks when code is moved or indentation shifts.