How do I scroll two split windows in sync so they move together?
The scrollbind option locks two or more windows together so that scrolling in one window automatically scrolls the others by the same amount.
category:
buffers-windows
tags:
#windows
#navigation
#splits
#diff
#productivity
How do I rearrange window splits by moving a window to a different side of the screen?
<C-w>H / <C-w>J / <C-w>K / <C-w>L
The H, J, K, and L commands move the current window to the far left, bottom, top, or right of the screen respectively, rearranging your entire split layout.
category:
buffers-windows
tags:
#windows
#buffers
#navigation
#splits
#layout
How do I save my entire Vim workspace and restore it later?
:mksession / :source Session.vim
Vim's session feature saves a snapshot of your entire workspace — open buffers, window layout, tab pages, current directory, and more — to a file that you c
category:
buffers-windows
tags:
#buffers
#windows
#config
#productivity
#workflow
#session
How do I browse and manage files using Vim's built-in file explorer?
:Explore / :Vexplore / :Sexplore
Vim ships with netrw, a built-in file explorer that lets you browse directories, open files, create new files, rename, and delete — all without plugins.
category:
buffers-windows
tags:
#navigation
#buffers
#file-management
#netrw
#productivity
What is the location list and how does it differ from the quickfix list?
The location list is a per-window variant of the quickfix list.
category:
buffers-windows
tags:
#navigation
#quickfix
#ex-commands
#windows
#productivity
How do I create a temporary scratch buffer for quick notes without saving a file?
:enew | setlocal buftype=nofile bufhidden=wipe noswapfile
A scratch buffer is a temporary, unnamed buffer that exists only in memory — it won't prompt you to save when you close it and leaves no trace on disk.
category:
buffers-windows
tags:
#buffers
#editing
#ex-commands
#productivity
#workflow
How do I split the window vertically in Vim?
The :vsplit command (or :vs for short) splits the current window vertically, creating a new window side-by-side with the current one.
category:
buffers-windows
tags:
#buffers-windows
#windows
#ex-commands
How do I switch between split windows in Vim?
The (Ctrl+w Ctrl+w) command cycles the cursor to the next window in the current tab.
category:
buffers-windows
tags:
#buffers
#windows
#navigation
#normal-mode
How do I resize a split window in Vim?
The + and - commands increase or decrease the height of the current split window by one line.
category:
buffers-windows
tags:
#buffers-windows
#windows
#normal-mode
How do I move a split window into its own tab?
The T (Ctrl+w then Shift+t) command moves the current split window into a new tab page.
category:
buffers-windows
tags:
#buffers-windows
#windows
#tabs
#normal-mode
How do I switch to the next buffer in Vim?
The :bnext (or :bn for short) command switches to the next buffer in Vim's buffer list.
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I open a file in a new tab in Vim?
The :tabnew filename command opens a file in a new tab page in Vim.
category:
buffers-windows
tags:
#buffers-windows
#tabs
#ex-commands
#navigation
How do I switch to the previous buffer in Vim?
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I list all open buffers in Vim?
The :ls command displays a list of all open buffers in Vim, showing their buffer number, status indicators, file name, and the line the cursor was last on.
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I make all split windows the same size?
The = (Ctrl+w then =) command resizes all open split windows so they have equal width and height.
category:
buffers-windows
tags:
#buffers-windows
#normal-mode
How do I close all windows except the current one?
The :only command closes every window in the current tab page except the one your cursor is in.
category:
buffers-windows
tags:
#buffers-windows
#windows
#ex-commands
How do I close the current window in Vim?
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.
category:
buffers-windows
tags:
#buffers-windows
#windows
#normal-mode
How do I diff two buffers side by side in Vim?
The :windo diffthis command activates Vim's built-in diff mode across all visible windows, highlighting the differences between them.
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
#editing
How do I split the Vim window to view two files at once?
The :split command (or s) splits the current window horizontally, creating a new window above with the same file.
category:
buffers-windows
tags:
#buffers
#windows
#split
#normal-mode