How do I quickly switch between the current file and the last edited file?
Pressing (Ctrl-6 on most keyboards) instantly toggles between the current buffer and the alternate file — the last file you were editing.
category:
buffers-windows
tags:
#navigation
#buffers
#normal-mode
#productivity
#windows
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
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 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 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 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