How do I jump to a tag in a new split window showing all matching tags?
<C-w>g]
g] splits the window and then runs :tselect for the identifier under the cursor, displaying a numbered list of all matching tags so you can pick the exact defin
<C-w>g]
g] splits the window and then runs :tselect for the identifier under the cursor, displaying a numbered list of all matching tags so you can pick the exact defin
:tabfind {name}
:tabfind is the tab-aware counterpart to :find.
% (in netrw)
Vim's built-in file explorer netrw (opened with :Explore or :Ex) is more capable than it looks.
:set winfixwidth
Setting winfixwidth on a window tells Vim not to adjust its width when other windows are created, closed, or resized with =.
:wincmd {key}
:wincmd is the Ex command equivalent of any keystroke.
z{N}<CR>
The z{N} command sets the current window's height to exactly N lines and simultaneously positions the current line at the top of the window.
<C-w>H and <C-w>K
After opening a split you can dynamically reposition windows using H, J, K, and L.
buffers-windows #windows #buffers-windows #navigation #normal-mode
:vertical {cmd}
The :vertical command modifier forces any window-opening Ex command to create a vertical split instead of the default horizontal split.
buffers-windows #windows #buffers #command-line #splits #ex-commands
{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
:DiffOrig
:DiffOrig opens a side-by-side split comparing your current (unsaved) buffer against the version on disk.
buffers-windows #diff #buffers #editing #workflow #buffers-windows
: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
: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
do and dp
When comparing files with :vimdiff or :diffthis, Vim highlights each difference as a hunk.
:colder
Vim maintains a history stack of up to 10 quickfix lists.
buffers-windows #buffers-windows #navigation #ex-commands #search
:lcd %:p:h
:lcd %:p:h sets the working directory for the current window to the directory of the file you're editing, using Vim's path expansion modifiers.
:tabmove {n}
:tabmove {n} repositions the current tab page to index n in the tab bar (0-indexed from the left).
:diffget 2
When Vim's diff mode has three or more buffers open, :diffget (or do) without an argument is ambiguous — Vim cannot determine which buffer to pull from.
:diffsplit {file}
:diffsplit {file} opens a file in a horizontal split and immediately activates diff mode, highlighting the differences between both buffers.
:vert {cmd}
Vim's :vertical modifier (abbreviated :vert) can be prepended to any Ex command that opens a split window to make it open as a vertical split instead of a horiz
buffers-windows #buffers-windows #windows #splits #ex-commands