How do I jump to the start or end of a C-style block comment in Vim?
[/
When editing code, you often need to navigate to the boundaries of multi-line block comments (/ .
[/
When editing code, you often need to navigate to the boundaries of multi-line block comments (/ .
m<
Vim's ' marks record the start and end of the last visual selection and power the ' range used by Ex commands.
/\c
Vim lets you override the ignorecase and smartcase settings on a per-search basis using the \c (case-insensitive) and \C (case-sensitive) atoms directly inside
{count}gt
Prefixing gt (go to next tab) with a count jumps directly to the tab page at that position.
buffers-windows #tabs #buffers-windows #navigation #normal-mode
mt and mc in netrw
Netrw, Vim's built-in file browser, has a full file-management workflow driven by marks.
:Lexplore
:Lexplore opens Vim's built-in netrw file explorer as a persistent sidebar anchored to the left of the screen.
buffers-windows #netrw #file-explorer #buffers #windows #navigation
z<CR>
While zt scrolls the current line to the top of the screen, z does the same scroll but also moves the cursor to the first non-blank character of that line.
]c / [c (gitsigns.nvim)
gitsigns.
<C-x> / <C-v> / <C-t> (in Telescope)
When browsing results in a Telescope picker, you are not limited to opening selections in the current window.
:Oil
oil.
:set winwidth=85 winheight=20
Setting winwidth and winheight tells Vim the minimum column width and line height the current focused window must have.
:lgrep {pattern} {files}
The location list is a per-window counterpart to the global quickfix list.
buffers-windows #buffers-windows #ex-commands #search #navigation
zj
When your file uses folds, zj and zk let you navigate directly to fold boundaries — jumping to the start of the next fold below or the end of the previous fol
[d
The [d command searches from the beginning of the file for the first line matching the define pattern for the word under the cursor, and displays it in the stat
:colder
Vim maintains a history stack of up to 10 quickfix lists.
buffers-windows #buffers-windows #navigation #ex-commands #search
:cd -
The :cd - command switches Vim's global working directory back to the previous one, just like cd - in the shell.
:'<,'>
Vim automatically sets two special marks whenever you make a visual selection: ' (end).
grn, gra, grr, gri
Starting with Neovim 0.
nnoremap <expr> j v:count == 0 ? 'gj' : 'j'
By default, j and k move by physical lines (newline-delimited), which jumps over the entire visual span of a long wrapped line in a single keystroke.
:find **/*.py
Vim's built-in :find command supports recursive glob patterns, making it possible to locate and open files anywhere in a project without installing a fuzzy find