How do I search for an exact multi-word phrase or special text I've selected?
* (in visual mode)
In normal mode, searches for the word under the cursor with word-boundary anchors.
2277 results for "@a"
* (in visual mode)
In normal mode, searches for the word under the cursor with word-boundary anchors.
""p
The unnamed register "" is the default target for yank, delete, and change operations.
:r !date
Use :r !command to read the output of a shell command into the buffer below the cursor.
require('lazy').setup(plugins)
lazy.
vim --startuptime /tmp/vim-startup.log
When Vim takes too long to start, the --startuptime flag writes a detailed timing log showing exactly how long each plugin, script, and initialization step take
gd and gD
Vim's gd and gD commands jump to the declaration of the identifier under the cursor by searching upward through the file — no ctags setup required.
yy
The yy command yanks (copies) the entire current line, including the newline character.
set complete+=kspell
Adding kspell to the complete option makes and draw from the active spell word list — every word Vim considers correctly spelled.
vim --startuptime /tmp/vim-startup.log +qall && sort -k2 -rn /tmp/vim-startup.log | head -20
When Vim starts slowly, the --startuptime flag writes a timestamped log of every script and plugin loaded during initialization.
set wildmenu wildmode=longest:full,full
Enable wildmenu for a visual menu above the command line.
<C-e>
The command scrolls the window down one line at a time while keeping the cursor on its current line (until the cursor would go off-screen).
<C-w>=
The = (Ctrl+w then =) command resizes all open split windows so they have equal width and height.
z<CR> and z. and z-
Vim has two sets of scroll-and-position commands: zt/zz/zb (which reposition the screen but keep the cursor column intact) and z/z.
vim-polyglot
The vim-polyglot plugin is a curated collection of language packs for Vim that provides syntax highlighting, indentation, filetype detection, and compiler suppo
"1p then u.u.u.
Vim stores your last 9 deletions (of one line or more) in the numbered registers "1 through "9.
registers #registers #editing #normal-mode #undo-redo #paste
:profile start profile.log | profile func *
When Vim feels sluggish during editing—not just at startup—you need runtime profiling to pinpoint which functions are consuming the most time.
config #profiling #debugging #config #ex-commands #performance
dp and do
When comparing two files side by side in Vim's diff mode (:diffsplit or vim -d file1 file2), you often want to accept or push individual changes between the fil
C
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
<C-o> and <C-i>
Vim maintains a jump list of positions you have visited.
<C-f> (in command line)
Pressing while you are already typing in the Vim command line (:), search line (/ or ?), or input prompt switches you into the command-line window with the curr
command-line #command-line #ex-commands #editing #normal-mode