mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Swapping Split Windows as a vim til.
This commit is contained in:
14
vim/swapping-split-windows.md
Normal file
14
vim/swapping-split-windows.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Swapping Split Windows
|
||||
|
||||
Consider a scenario where you have a vim window that has been split
|
||||
horizontally into two viewports. You'd prefer the top one to be on bottom
|
||||
and the bottom one to be on top. You want to swap them.
|
||||
|
||||
If you are currently focused on the top viewport, then tell vim to move that
|
||||
viewport down with `CTRL-w J`. As you might guess, moving the bottom
|
||||
viewport up can be done with `CTRL-w K`. `J` and `K` mean down and up in
|
||||
other contexts; vim is consistent with their meaning here.
|
||||
|
||||
Viewports of a vertical split can be swapped in the same sort of way. Use
|
||||
`CTRL-w L` to move the left viewport to the right. Use `CTRL-w H` to move
|
||||
the right viewport to the left.
|
||||
Reference in New Issue
Block a user