11.3.8 Split screen with
vim can edit multiple files in a multi-split-screen environment.
Type :help usr_08.txt for details.
To split the screen display between different files, type at the vi command
Or at a shell prompt:
$ vi -o file1.txt file2.txt # Horizontal split
$ vi -O file1.txt file2.txt # Vertical split
will provide multiwindow vi.
$ vimdiff file.txt~ file.txt # check recent changes of file.txt
$ vimdiff file.en.sgml file.fr.sgml # check changes of translation
$ gvimdiff file.txt~ file.txt # in X
will provide a nice view of differences between an original and a backup file.
In SGML it matches tags, so comparing translations in this mode works very
Special cursor movements with Ctrl-W commands:
Ctrl-W + increase the size of a window
Ctrl-W - decrease the size of a window
Ctrl-W h move to the window left
Ctrl-W j move to the window below
Ctrl-W k move to the window above
Ctrl-W l move to the window right
Use the following to control screen scrolling: