How do I move between split windows using direction keys in Vim?
<C-w>h / <C-w>j / <C-w>k / <C-w>l
How it works Vim lets you navigate between split windows using followed by a direction key.
16 results for "ctrl w"
<C-w>h / <C-w>j / <C-w>k / <C-w>l
How it works Vim lets you navigate between split windows using followed by a direction key.
<C-w><C-w>
The (Ctrl+w Ctrl+w) command cycles the cursor to the next window in the current tab.
<C-w>+
When working with multiple split windows, you often need to resize them to see more content in one pane.
Write keystrokes in buffer, then "qy$
Instead of recording a macro in real-time (where mistakes mean starting over), you can write the keystrokes as text in a buffer, edit them visually, and then ya
macros #macros #editing #registers #workflow #best-practices
: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.
<C-w>=
The = (Ctrl+w then =) command resizes all open split windows so they have equal width and height.
<C-w>c
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.
<C-t> / <C-d>
While in Insert mode, you can adjust indentation without switching back to Normal mode.
:only
The :only command closes every window in the current tab page except the one your cursor is in.
<C-w>T
The T (Ctrl+w then Shift+t) command moves the current split window into a new tab page.
buffers-windows #buffers-windows #windows #tabs #normal-mode
"ap, edit, "ayy
Vim stores macros in registers, which means you can paste a macro's contents into a buffer, edit it as regular text, and yank it back into the register.
:let @q = "dwelp"
Recording macros with q works well for simple sequences, but complex macros with special keys can be hard to get right in one take.
:set clipboard=unnamedplus
Setting clipboard=unnamedplus makes Vim's default yank and paste use the system clipboard.
<C-o>
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
<C-^>
Pressing (Ctrl-6 on most keyboards) instantly toggles between the current buffer and the alternate file — the last file you were editing.
buffers-windows #navigation #buffers #normal-mode #productivity #windows
<C-i>
Every time you make a "jump" — using G, /, %, :tag, , or similar commands — Vim records your position in the jump list.