vim looks at how it was invoked to decide how it should behave. If invoked as ex, it will operate as a line editor. It also allows the Q command from vi mode to switch into ex mode. If invoked as view, it will start in vi mode, but mark each file initially as being read-only.
When invoked as gvim or gview, vim will start the GUI version, under X Windows or in whatever other graphical interface is appropriate. If a leading r is prepended to any of the names, vim enters "restricted" mode, where certain actions are disabled.
vim has a large number of command-line options. The most useful are described here:
The -i, -n, -u and -U options are discussed in more detail below. There are several more options; the interested reader is referred to the online documentation for the full details.
Copyright © 2003 O'Reilly & Associates. All rights reserved.