The vim GUI is available for UNIX, with Athena and Motif interfaces, Windows 95 and Windows NT, and BeOS. GUI versions for the Amiga, VMS, and the Macintosh are being worked on. A screen shot is shown in Figure 11.1 .
The main advantage of the GUI version is that all colors can be used, without the configuration problems that many terminal emulators have with color. The picture shows the Motif version. What you can't see in the monochrome picture are the various colors that are used to highlight items in the text. For example, the comments are blue and strings are magenta.
The GUI window contains a menu at the top, one scrollbar for each window at the right, and a scrollbar at the bottom for horizontal scrolling. Not only do the scrollbars make it easy to browse through the file, they also give an indication of the current position in the file.
The cursor is after the
The top window contains a shell script, the middle a Makefile , the lower a C program. They are all highlighted automatically when the file is opened. These are three of the about 70 syntaxes that are supported by the distribution (see Section 11.9.2, "Syntax Highlighting" ).
All occurrences of to
text are highlighted with a yellow background.
This is the
The reverse video free
in the top window is the current match for the search
pattern that is being typed in the commandline. This shows
What you don't see in the picture are the file browser and dialogues,
which are used when a command is selected from a menu.
This is a new feature in vim
For example, the
One nice specialty of vim
is that almost everything is configurable.
This also includes the menus.
If you don't like the menus provided, you can define
your own. This works almost like defining a mapping.
For example, this adds an
:amenu IDE.Make-n :make -n<CR>
To include a dot or space in a menu name, precede it with a backslash.
To get the same menu entry,
but with a space before the
:amenu IDE.Make\ -n :make -n<CR>
As you can see, the backslash is not needed in the argument, only in the menu name. All this makes a nice GUI environment, while all the good old vi commands still work as in the terminal version.
The online help fully describes all of the GUI options, and how to create your own menus.