How do I scroll the view left and right when lines are wider than the screen?
zl
When nowrap is set and lines extend beyond the screen width, Vim provides dedicated horizontal scroll commands.
287 results for ":jumps"
zl
When nowrap is set and lines extend beyond the screen width, Vim provides dedicated horizontal scroll commands.
packadd matchit
Vim ships with matchit.
b
The b command moves the cursor backward to the beginning of the previous word.
d3aw
Most Vim users know you can put a count before an operator (3dw) or use a text object once (daw).
editing #text-objects #editing #delete #normal-mode #motions
:set switchbuf=useopen,usetab
By default, Vim opens a new window (or reloads the buffer in the current window) whenever you navigate to a quickfix entry, tag, or :buffer command — even if
:set formatoptions+=a
Vim's formatoptions setting controls how automatic text formatting works.
*
The command searches forward for the exact word under the cursor, jumping to the next occurrence.
g^ and g$
When wrap is on, long lines wrap visually across multiple screen lines.
das
Vim defines a sentence as text ending with .
editing #editing #text-objects #delete #normal-mode #motions
o (visual mode)
In visual mode, pressing o swaps the cursor between the two ends of the selection (the anchor and the free end).
]c / [c
The vim-gitgutter plugin shows Git diff markers in the sign column and provides ]c and [c mappings to jump between changed hunks — groups of added, modified,
]' and ['
The ]' and [' motions let you traverse every lowercase mark set in the current buffer without needing to remember which registers you used.
?{pattern}
The ? command searches backward from the cursor position.
:wincmd
:wincmd {key} executes any {key} window command from the Ex command line or from inside a Vimscript function.
:lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})
Neovim's built-in diagnostic system (vim.
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.
g$
The g$ command moves the cursor to the last character of the current screen line, not the end of the logical line.
n
After performing a search with / or ?, pressing n repeats the search in the same direction to find the next match.