How do I autocomplete Vim command names and their arguments while in insert mode?
<C-x><C-v>
The key sequence in insert mode triggers Vim command-line completion — the same completion engine used at the : command prompt.
2277 results for "@a"
<C-x><C-v>
The key sequence in insert mode triggers Vim command-line completion — the same completion engine used at the : command prompt.
<C-w>x
How it works The x command exchanges the current window with the next one.
gwip
The gw operator reformats text just like gq, but leaves the cursor in its original position after reformatting.
<C-v>I
Visual block mode's I command lets you type once and have the text inserted at the cursor column across all selected lines simultaneously.
:augroup
Wrapping autocmds in a named augroup with autocmd! at the start prevents duplicate autocommands from accumulating every time your vimrc is sourced.
:iabbrev {abbr} {expansion}
How it works The :iabbrev command creates abbreviations that automatically expand when you type them in insert mode.
augroup MyGroup | autocmd! | augroup END
Every time you run :source $MYVIMRC or :source % to reload your config, any bare autocmd calls are appended to Vim's autocommand table — no checking for dupli
<C-v> (in visual mode)
Once you are in any visual mode, pressing v, V, or switches to charwise, linewise, or blockwise visual mode respectively — without cancelling the current sele
<C-t> and <C-d> in insert mode
When typing in insert mode, you can adjust the current line's indentation without leaving to normal mode.
:set display=lastline
By default, when the last visible line of a window is too long to fit on screen, Vim shows @@@ in its place — hiding the content entirely.
iW vs iw
Vim has two flavors of the "inner word" text object that are easy to confuse: iw (lowercase) and iW (uppercase).
:lua require('flash').jump()
flash.
:set scroll=10
The scroll option determines how many lines (scroll up) and (scroll down) move the viewport.
:psearch /pattern/
When you need quick context from another file but do not want to disturb your current editing window, :psearch gives you a clean workflow.
buffers-windows #buffers #windows #preview-window #search #navigation
Va{ or Vi{
The a{ (around braces) and i{ (inside braces) text objects combined with visual mode let you instantly select an entire function body or code block, regardless
visual-mode #visual-mode #text-objects #code-navigation #selection
g; and g,
Vim tracks every position where you made a change in the changelist.
:set splitright splitbelow
By default, :split opens a new window above the current one and :vsplit opens to the left — the opposite of most modern IDEs and editors.
]m / [m / ]M / [M
When navigating large source files, ]m and [m let you jump directly to the start of the next or previous method.
:Inspect
When customizing a colorscheme or debugging unexpected syntax colors, it's difficult to know which highlight group to override.
<C-g>U{motion}
By default, moving the cursor with arrow keys while in insert mode creates an undo break — meaning a subsequent u will undo only back to when you last moved,