11.5. Multiwindow Editing

There are a large number of vi mode commands for manipulating windows, as well as a number of ex mode commands that correspond to most of the vi mode commands.

As in elvis, the :split command will create a new window, and then you can use the ex command :e filename to edit a new file in the new window. Also as in elvis, CTRL-WCTRL-W will let you switch back and forth between windows.

<preface id="VI6-CH-0">
<title>Preface </title>

Text editing is one of the most common uses of any computer system, and
<command>vi</command> is one of the most useful standard text editors
on your system.
With <command>vi</command> you can create new files, or edit any
existing UNIX text

# Makefile for vi book
# Arnold Robbins

CHAPTERS = ch00_6.sgm ch00_5.sgm ch00.sgm ch01.sgm ch02.sgm ch03.sgm \
	ch04.sgm ch05.sgm ch06.sgm ch07.sgm ch08.sgm
APPENDICES = appa.sgm appb.sgm appc.sgm appd.sgm

POSTSCRIPT = ch00_6.ps ch00_5.ps ch00.ps ch01.ps ch02.ps ch03.ps \
	ch04.ps ch05.ps ch06.ps ch07.ps ch08.ps \


The split screen is the result of typing vim ch00.sgm followed by :split Makefile.

Unlike nvi and elvis, all windows share the bottom line of the screen for execution of ex commands. However, the status line for each file displays [+] if that file has been modified. Options control the use of reverse video versus highlighting for the status line, as well as whether the bottom window even has one. By default, the bottom window has a status ...

Get Learning the vi Editor, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.