How do I move to the first or last non-blank character of a soft-wrapped display line?
g^ and g$
When wrap is on, long lines wrap visually across multiple screen lines.
g^ and g$
When wrap is on, long lines wrap visually across multiple screen lines.
z. and z<CR> and z-
Vim has two parallel sets of scroll commands: the well-known zz, zt, zb which reposition the view without moving the cursor, and the lesser-known z.
:tjump /pattern
:tjump is a smarter variant of :tag.
]s
When spell checking is enabled with :set spell, Vim underlines misspelled words in the buffer.
:checkpath!
:checkpath! recursively walks through every file reachable via Vim's include path and displays the full include tree.
g+
Vim's undo history is a tree, not a linear stack.
d'a
Named marks are not just jump destinations — they serve as motion targets for any operator.
navigation #navigation #marks #editing #motions #normal-mode
[* and ]*
The [ and ] motions (also written as [/ and ]/) let you jump directly to the opening / or closing / of a C-style block comment.
zh and zl
When wrap is disabled, long lines extend off-screen.
`"
The " mark is an automatic mark Vim sets whenever you leave a buffer — switching to another file, hiding the buffer, or quitting Vim (with viminfo/shada enabl
[#
Vim includes built-in motions for navigating C preprocessor conditional blocks: [# jumps backward to the previous unmatched #if or #else, and ]# jumps forward t
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.
:set jumpoptions+=view
By default, when you navigate the jump list with (older) or (newer), Neovim restores the cursor's line and column but does NOT restore where the window was scro
g0
When wrap is on, a long buffer line can span multiple screen (display) lines.
navigation #navigation #motions #wrap #display-lines #normal-mode
'^
Vim automatically maintains a special mark ^ that records the exact position of the cursor the last time you left insert mode.
]' and ['
The ]' and [' motions let you traverse every lowercase mark set in the current buffer without needing to remember which registers you used.
:delmarks!
Marks accumulate as you work — ma, mb, mc and so on record positions for later jumps.
g$
The g$ command moves the cursor to the last character of the current screen line, not the end of the logical line.
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.
2<C-g>
Pressing prints the current filename, buffer status, and cursor position in the status line.