vipcPC-specific set options to Vi |
Miscellaneous Information |
map
and
map!
statements single keystrokes which are not ASCII
characters. Such keystrokes are represented by a keyword whose first character
is #
. They are transmitted by a key but do not
necessarily have any ASCII equivalent.
Keyword | Symbol | Function | Default | Default |
---|---|---|---|---|
map |
map! |
|||
#up | ↑ | Cursor Up | k |
ESCka |
#down | ↓ | Cursor Down | j |
ESCja |
#left | ← | Cursor Left | h |
ESCha |
#right | → | Cursor Right | l |
ESCla |
#ppage | PgUp | Page Up | ^B |
ESC^Bi |
#npage | PgDn | Page Down | ^F |
ESC^Fi |
#home | Home | Top Left | H |
ESCHi |
#end | End | End of Line | $ |
ESC$a |
#insert | Ins | Insert | i |
ESCia |
#delete | Del | Delete | x |
ESC xi |
#backtab | |-> | Shift-Tab | ||
#ctrl-left | CTRL-← | Control Left-Arrow | 0 |
ESC0i |
#ctrl-right | CTRL-→ | Control Right-Arrow | $ |
ESC$a |
#ctrl-up | CTRL-↑ | Control Up-Arrow | ||
#ctrl-down | CTRL-↓ | Control Down-Arrow | ||
#ctrl-end | CTRL-End | Control End | ||
#ctrl-npage | CTRL-PgDn | Control Page Down | ||
#ctrl-ppage | CTRL-PgUp | Control Page Up | ||
#ctrl-home | CTRL-Home | Control Home | ||
#1 | F1 | Function 1 | ||
... | ||||
#11 | F11 | Shift Function 1 | ||
... | ||||
#20 | F20 | Shift Function 10 | ||
#alt-a | ALT-A | Alternate A | ||
... | ||||
#alt-z | ALT-Z | Alternate Z | ||
#alt-0 | ALT-0 | Alternate 0 | ||
... | ||||
#alt-9 | ALT-9 | Alternate 9 |
Table 1: Mapping Non-ASCII Characters in vi
no
, it defaults to off. Default
values are shown after =
. The minimal abbreviation is shown after
the comma.
0x07000000
This allows every character on the screen to be displayed in a
non-normal attribute. This attribute value is or'ed into each character
cell on the screen. Normally the least significant byte of each cell is
the character and the most significant byte is the attribute. The default
is to make each cell the normal white on black. To make your screen
inverse video, set attrib
to 0x7000. See your display adaptor
manual for a full listing of the attributes available.
0x8000 Background intensity 0x4000 Background red 0x2000 Background green 0x1000 Background blue 0x0800 Foreground intensity or bold 0x0400 Foreground red 0x0200 Foreground green 0x0100 Foreground blue
0x0B0C0000
This lets you display a different cursor than the default. The number specified is actually two bytes, specifying the start and stop lines for the cursor. The most significant byte is the starting scan line for the cursor; the least significant byte is the ending scan line. Scan lines are counted downwards from the top of the character. 0x0B0C, the default, thus decodes into eleventh through twelfth scanlines. On the color adaptor, the default for this value is 0x0607 or the sixth and seventh scan lines.
These defaults are set by requesting BIOS to report the current cursor scan lines in use. Thus, if you are running with some other cursor, Vi continues to use that cursor. Thecursor
variable sets the cursor size to percentage of the
character height. For example,
would set the cursor size to 50% of a character position.set cursor=50
0x090D0000
This lets you display a different cursor than the default when in
insert mode. It is specified in the same manner as for the
cursor
set option. The default value causes a half-cell sized
block cursor covering scanlines 9 through 13. On the color adaptor, the
default is 0x0408 for scan lines 4 through 8.
cursorins
variable sets the cursor size to a percentage
of the character height. For example,
would set the cursor size to 30% of a character position.set cursorin=30
0x70000000
This lets you set the attributes associated with an error message. The default is inverse video.
no
nativeWhen this option is on, Vi uses the device's own character set to display characters that are normally unprintable. See the section on Non-Printable Characters.
-i
When you type a !
command,
vi
uses the chosen shell to run a
single command, and informs this shell to run non-interactively if
possible. The default value of this variable depends upon the value of
the SHELL
environment variable. If you've set
SHELL
, then the default value for
shelliopt
is -i
.
-c
When you type a !
command,
vi
uses the chosen shell to run a
single command. To accomplish this, it invokes the shell with an option
that runs a specified command and exits. For MKS KornShell, this is
-c
. If the name of the shell (set by the shell
variable) was taken from the SHELL
environment
variable, then shellopt
defaults to -c
.
On PCs, line delimiters are generally RETURN-NEWLINE. Under most other
systems (including UNIX and POSIX systems), they are simply NEWLINE.
Therefore Vi deletes all RETURN characters followed by a NEWLINE upon
input (RETURN characters not followed by a NEWLINE are passed through),
and inserts a single RETURN before each NEWLINE upon output. If
tosscr
is set off, RETURN is treated like any other character,
and normal files show up with ^M
on the end of each line.
^
) followed by two hex digits indicating their value.
These characters may be generated through the keyboard by using any of the
KEYBxx
commands, or by holding the ALT key and typing a
decimal number on the keypad. Non-printable characters with values less than
0x80 are displayed as a caret (^
) followed by the character
representing the control character.
On the PC display, all characters are actually printable. Thus, we define
non-printable characters as the control characters, and those from 0x7F and up
that are not alphabetic letters. So, for example, 0x9E, being an accented E is
considered printable, while 0xD0, being a box drawing character, is considered
non-printable.
Setting the native
variable displays all unprintable characters in
the device's own character set. Thus non-ASCII and control characters are shown
on the PC display as accented characters, currency symbols, and other special
characters such as happy faces and musical notes.