How do I center the screen on the cursor line?
zz
The zz command scrolls the window so that the current cursor line appears in the middle of the screen.
953 results for ":normal"
zz
The zz command scrolls the window so that the current cursor line appears in the middle of the screen.
t{char}
The t{char} command moves the cursor forward to the character just before the next occurrence of {char} on the current line.
do (diffget) / dp (diffput)
How it works When you open two files in diff mode (using vim -d file1 file2 or :windo diffthis), Vim highlights the differences between them.
"1 through "9
Vim maintains a rotating history of deleted text across registers "1 through "9.
:lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})
Neovim's built-in diagnostic system (vim.
"Ayy
The "Ayy command appends the current line to register a instead of overwriting it.
"_d
The "d command deletes text using the black hole register ("), which discards the deleted content instead of storing it.
zj and zk
How it works When working with folded code in Vim, you often want to skip from one fold to another without unfolding anything.
g0
When wrap is on, a long buffer line can span multiple screen (display) lines.
navigation #navigation #motions #wrap #display-lines #normal-mode
<C-i>
Every time you make a "jump" — using G, /, %, :tag, , or similar commands — Vim records your position in the jump list.
zO and zC
zO and zC are the recursive counterparts to zo and zc.
g'{mark}
Vim's standard mark-jump commands ('a, ` a `) always add the current position to the jumplist before leaping to the mark.
<C-v>{motion}I{text}<Esc>
Visual block mode () lets you select a rectangular region across multiple lines.
shellescape({expr})
The shellescape() function wraps a string in shell-safe quoting, escaping any special characters so it can be embedded in a shell command constructed with :exec
command-line #ex-commands #command-line #editing #normal-mode
<C-l> during / search
When searching with incsearch enabled, Vim highlights matches as you type.
ysiw)
The vim-surround plugin provides the ys (you surround) operator to wrap any Vim text object or motion with a delimiter pair.
plugins #plugins #surround #editing #text-objects #normal-mode
"+y
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
gwap
The gw operator reformats text to fit within 'textwidth' — identical in effect to gq, but with one key difference: the cursor returns to its original position
g-
Vim's undo history is a tree, not a linear stack.
:<C-u>MyCommand<CR>
When writing nnoremap or vnoremap mappings that call Ex commands, Vim may silently prepend a count or a visual range (') to your command before it runs.