Saturday, January 5, 2013

VIM : splitting the screen into multiple windows


While using vim, a screen can be split into multiple windows.
The window can be empty or a copy of the same file.

To view the same file in two separate windows, use the following in ex mode

:sp     Splits existing window in two

In this case changes made in one window shall be also seen in the other window.

To create a new window which is not associated with any file

:new       New blank window

To move between windows

[Ctrl-w][Ctrl-w]

To make the current window the only window on the screen and close the other window, use

:on     Removes the other window

No comments:

Post a Comment