diff --git a/README.md b/README.md index 97b3b2c..eb37edb 100644 --- a/README.md +++ b/README.md @@ -214,6 +214,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Set Your Color Scheme](vim/set-your-color-scheme.md) - [Split Different](vim/split-different.md) - [Swap Occurrences Of Two Words](vim/swap-occurrences-of-two-words.md) +- [Swapping Split Windows](vim/swapping-split-windows.md) - [Tabs To Spaces](vim/tabs-to-spaces.md) - [The Vim Info File](vim/the-vim-info-file.md) - [Verbose Commits With Fugitive](vim/verbose-commits-with-fugitive.md) diff --git a/vim/swapping-split-windows.md b/vim/swapping-split-windows.md new file mode 100644 index 0000000..38f5fee --- /dev/null +++ b/vim/swapping-split-windows.md @@ -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.