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
254 results for ":split"
<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>f
How it works You may already know that gf opens the file path under the cursor in the current window.
:vnew | setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
For quick throwaway notes, command output cleanup, or temporary edits, a normal buffer is noisy: it appears in :ls, can prompt you to save, and may leave swap a
buffers-windows #buffers-windows #buffers #windows #scratch #workflow
:set winminheight=0
By default, Vim enforces a minimum window height of 1 line, which means you can never fully collapse a split.
buffers-windows #buffers-windows #windows #splits #navigation
<C-w>g<C-]>
Pressing g jumps to the definition of the tag under the cursor — just like — but opens the destination in a new horizontal split window.
:set eadirection=hor
If you use many splits, automatic equalization can feel disruptive when Vim resizes both height and width after layout changes.
<C-w>F
F opens the filename under the cursor in a new horizontal split window and jumps to the line number that follows the filename.
buffers-windows #navigation #buffers-windows #windows #editing
:s/,/\r/g
In Vim's substitute command, use \r (not \n) in the replacement to insert a real newline.
:set switchbuf=useopen
The switchbuf option controls how Vim decides where to display a buffer when switching to it via commands like :sb, :cc, :cn, quickfix jumps, or .
buffers-windows #buffers-windows #navigation #ex-commands #config
:set splitbelow splitright
How it works By default, Vim opens horizontal splits (:split or :sp) above the current window and vertical splits (:vsplit or :vsp) to the left.
v (netrw)
When browsing files in Vim's built-in file manager (Netrw), pressing v on any file opens it in a vertical split to the right.
:set splitkeep=topline
When you open, close, or resize splits in long files, the visible window region can shift in ways that break your reading flow.
:sp +/{pattern} {file}
The +{cmd} syntax lets you run an Ex command immediately after a file is opened.
:set noequalalways
When you work with carefully sized splits, Vim's default behavior can feel disruptive: opening or closing a window triggers an automatic rebalance.
<C-w>x
How it works The x command exchanges the current window with the next one.
:set fillchars+=vert:│,fold:·
The fillchars option controls the filler characters Vim uses for various UI elements — window separators, fold fill lines, diff padding, and more.
:setlocal winfixheight winfixwidth
If you use a dedicated utility pane (logs, quick notes, REPL output), Vim's default equalization behavior can keep resizing it whenever other splits change.
:set winfixheight
When you have a specific window you want to keep at a fixed size — like a terminal, log viewer, or reference file — winfixheight and winfixwidth prevent Vim
:resize +N / :resize -N
:resize adjusts the height of the current window by a relative or absolute amount.
:set laststatus=3
Neovim 0.