- 论坛徽章:
- 0
|
12.8.1 Command-Line History and Completion
vile stores all your ex commands in a buffer named [History]. This feature is
controlled with the history option, which is true by default. Turning it off
disables the history feature and removes the [History] buffer. The command
show-history will split the screen and display the [History] buffer in a new
window.
Starting with vile 7.4, the colon command line is really a minibuffer. You can use
it to recall lines from the [History] buffer and edit them.
You use the and keys to scroll backward and forward in the history, and
and to move around within the line. Your current delete character (usually
BACKSPACE) can be used to delete characters. Any other characters you type will
be inserted at the current cursor postion.
You can toggle the minibuffer into vi mode by typing the mini-edit character (by
default, ^G). When you do this, vile will highlight the minibuffer using the
mechanism specified by the mini-hilite option. The default is reverse, for
reverse video. In vi mode, you can use vi style commands for positioning. In
Version 8.0, you can also use the i, I, a, and A vi commands.
An interesting feature is that vile will use the history to show you previous data
that corresponds to the command you're entering. For instance, after typing :set
followed by a space, vile will prompt you with Global value:. At that point, you
can use to see previous global variables that you've set, should you wish to
change one of them.
The ex command line provides completion of various sorts. As you type the name
of a command, you can hit the TAB key at any point. vile will fill out the rest of
the command name as much as possible. If you type a TAB a second time, vile
will create a new window showing you all the possible completions.
Completion applies to built-in and user-defined vile commands, tags, filenames,
modes (described later in this chapter), variables, and to the terminal characters
(the character settings such as backspace, suspend, and so on, derived from your
stty settings).
As a side point, this leads to an interesting phenomenon. In vi-style editors,
commands may have long names, but they tend to be unique in the first few
characters, since abbreviations are accepted. In emacs-style editors, command
names often are not unique in the first several characters, but command
completion still allows you to get away with less typing.
12.8.2 Tag Stacks
Tag stacking is described in Section 8.5.3. In vile, tag stacking is available and
straightforward. It is somewhat different than the other clones, most notably in
the vi mode commands that are used for tag searching and popping the tag
stack. Table 12.2 shows the vile tag commands. |
|