O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving windows

Windows can also be moved, swapped, and resized. Since there's no drag-and-drop functionality in Vim, there are some commands you will have to remember.

You don't have to remember all of these commands, as long as you know what window operations are supported. :help window-moving and :help window-resize will take you to the corresponding entries in the Vim manual when you inevitably forget the shortcuts.

As with the rest of the window commands, these are prefixed by Ctrl + w.

Ctrl + followed, by an uppercase movement key (H, J, K, or L) will move the current window to the corresponding position:

  • Ctrl + w, H moves the current window to the leftmost part of the screen
  • Ctrl + w, J moves the current window to the bottom of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required