Screen Editor Options
Options for
se
can be specified in three ways:
with the o command, on the
Shell
command line that invokes
se,
or in the
.RC
file.
To specify an option with the o command,
just enter o followed immediately by
the option letter and its parameters.
To specify an option on the command line,
just use - followed by the option letter and its parameters.
With this second method, if there are embedded spaces in the parameter
list, the entire option should be enclosed in quotes.
To specify an option in the
.RC
file, add a line that contains an o command as described above.
For example, to specify the a (absolute line number) option
and tab stops at column 8 and every fourth thereafter with the
o command, just enter
oa
ot 8 +4
when
se
is waiting for a command.
To enter the same options on the invoking command line, you might use
se myfile -a "-t 8 +4"
The following table summarizes the available
se
options:
Toggles absolute line numbers mode on and off.
When this mode is in effect,
se
displays absolute, numeric, line labels in the line number area
of the screen.
The default behaviour is to run with this mode turned off and hence
display upper-case letters as line labels
with the letter A corresponding to the first line in the window.
Note that
se
accepts numbers to identify lines no matter what mode is in effect;
it only accepts letters when letters are displayed in the line number
area.
Associates a string with the given function key.
Gives
se
a simple keyboard macro facility plus the ability
to redefine the control keys to emulate other editors if required.
Toggles Source-Code mode on and off.
Normally,
se
regards text as an arbitrary sequence of characters,
organised into lines.
When Source-Code mode is in effect,
se
recognises certain symbols in a file that have special meanings.
They are the open and close comment symbols, two kinds of quotes
and both round and square brackets.
The text is scanned for these symbols and special action is taken
when they are found.
The comment symbols are used to display comments in a different colour
from program text.
The actual colour (or other visual effect) used is set by the
oj option.
As a consequence of the need to scan text for comment symbols,
se
also needs to know the language's quote symbols.
Finally, Source-Code mode checks for correct nesting of brackets
at certain times.
Nesting is checked only on the current line, so a spurious
warning appears if an expression has been continued from one line
to the next.
Checking is performed after each line is entered in append mode,
or after a line is changed in overlay mode.
The message bracket mismatch is displayed on the status line
when the bracket-checker spots an error.
It is only a warning and does not affect the operation of the editor.
By using the
se
initialisation file, it is possible
to recognise the file type, usually by its name,
and set up Source-Code mode accordingly.
Refer to the f option for details on defining symbols.
Refer to the description of the initialisation file for information
on recognising files by name.
See also the s option.
selects the placement of the current line pointer following
a d (delete) command.
<dir> must be either > or <.
If > is specified, the default behavior is selected:
the line following the deleted lines becomes the new current line.
If < is specified, the line immediately preceding
the deleted lines becomes the new current line.
If neither is specified,
the current value of <dir> is displayed in the status line.
| f | of/<q1>/<q2>/<lc>/<rc>/<lp>/<rp>/<cset>/ | Filetype |
sets filetype-related options.
Usually used in the conditional blocks of the
.RC
file,
this option sets up the source-code mode of
se
to respond correctly to the comment symbols and quoting convention
of the current language.
The two types of quote are specified first, followed by the left
and right comment symbols and the left and right pre-processor symbols.
Finally, a character set, specified using the same shorthand
notation as tlit, that helps
se
to recognise reserved words.
The usual conventions for representing special characters can be
used, particularly where the comment delimiter is NEWLINE.
Any character may be used, in place of /, as a delimiter.
See also the c and s options.
controls the behavior of the s (substitute)
command when it is under
the control of a g (global) command.
By default, if a substitute inside a global command fails,
se
will not continue with the rest of the lines which might succeed.
If og is given,
then the global substitute will continue, and lines
which failed will not be affected.
Successive og commands will toggle this behavior.
An explanatory message is placed in the status line.
Toggles line insert/delete behaviour.
Certain types of computer (those that have serial terminals)
require this option to adjust the method of screen updating.
When line insert/delete is active,
se
uses more efficient and logical behaviour when append mode
reaches the bottom of the screen.
When it is inactive, the behaviour can appear strange to some users,
so this option defaults to on.
oh is provided for those users whose terminals are too
slow for line insert/delete to be used.
Selects indent value for lines typed in
with a, c and i commands.
The indent value is initially set to 1, i.e. text begins at the
left margin.
a selects auto-indent which sets the
indent to the value which equals the indent of the previous line.
If <indent> is an integer, then the indent value will be set
to that number.
If neither a nor <indent> are specified, the current value
of indent is displayed.
Set foreground and background colours for the given screen zone.
The screen zones are indicated by a single letter code, as follows:
t - text in the buffer
c - text on the command line
C - text of comments in source-code mode
h - text of help display
- - line below help display
b - vertical bar (left margin)
m - messages on status line
s - status line
p - prompts
u - unprintable characters
n - line numbers
1 - number of first line
.cc |
. - number of current line
|cc
$ - number of last line
k - mark names
! - OS shell
The codes for colours vary from one machine to another,
but the following table gives the general idea:
k - blacK
b - Blue
g - Green
c - Cyan
r - Red
m - Magenta
y - Yellow
w - White
Upper case letters indicate brighter colours
Bright black comes out dark grey!
Indicates whether the current contents of your edit buffer
has been saved or not by displaying either a saved or
not saved message on the status line.
As an alternative to using the ok command, the oki
option is available.
When oki is used, an indicator appears on the status line
as soon as the buffer has been changed.
The indicator goes away again whenever the file is written to disk.
sets the line number display option.
Under control of this option,
se
continuously displays the value of one of three symbolic line numbers
in the status line.
<lop> may be any of the following:
- .
display the current line number
- #
display the number of the top line on the screen
- $
display the number of the last line in the buffer
- %
display the current line number as a percentage of
the value of $.
Indicates how far down a file the current line is.
.ta 11
If <lop> is omitted, the line number display is disabled.
sets the left margin to <col> which must be a positive integer.
This option will shift your entire screen to the left,
enabling you to see characters at the end of the line that
were previously off the screen;
the characters in columns 1 through <col> - 1 will not be visible.
You may continue editing in the normal fashion.
To reset your screen enter the command olm 1.
If <col> is omitted, the current left margin column
is displayed in the status line.
Toggles mail notify mode on and off.
| n | on<reserved_word> | Nominate reserved words |
Defines a reserved word when
se
is running in Source-code mode.
This option is normally used in the
.RC
file as part of a language setup block.
toggles Script mode.
When given a file name, oo switches
se's
input stream to that file.
If oo is encountered in that file, the file remains open,
but the input is again read from the keyboard.
Now, when oo is typed, input toggles back to the file again,
and so on until either another oo is read, or the file ends.
| p | op[a|c|g|w] <string> | Prompt |
sets prompts that
se
displays in the left margin.
Typing opa sets the append prompt, normally apd>,
opg sets the gone prompt gone,
opc sets the command prompt cmd> and
opw sets the wait prompt, normally blank.
Up to six characters are permitted in prompt strings.
toggles Quiet mode.
By default,
se
will use whatever means is available to make a noise when certain
conditions arise.
One example is when the cursor reaches the margin.
This can be annoying in a quiet environment, or when the hardware
designer has been over-keen with the audio output power,
hence quiet mode.
toggles Read-Only mode.
When read-only mode is in effect,
no changes are permitted to the buffer.
This is useful when viewing a file that must not be modified.
If the command orf is used, the state of the file's
read-only flag is toggled in addition to protecting the buffer;
if or is used, only the buffer is affected.
If a file is protected by the Operating System,
preventing
se
writing any changes into it,
Read-Only mode is set automatically by the e command.
The message read-only appears on the status line
when this mode is in effect.
| s | os[<file_suffix>] | Source code |
Sets up
se
for editing certain types of file.
Se
looks at the suffix on the file name whenever it reads a file.
It first resets all the options to their default states,
then reads the
.RC
file (if it finds one).
In this file there may be blocks of commands that are
conditional.
That is, they are only obeyed if the file suffix matches the
block's name.
The os option allows the user to set options for a file
suffix given on the command line; this is usually used when
typing into an un-named buffer.
Refer to the c and f options for information
on how to set up
se
for different languages.
sets tab stops according to <tabs>.
<Tabs> consists of a series of numbers indicating
columns in which tab stops are to be set.
If a number is preceded by a plus sign (+),
it indicates that the number is an increment; stops are set
at regular intervals separated by that many columns, beginning with
the most recently specified absolute column number. If no such
number precedes the first increment specification, the stops are
set relative to column 1.
By default, tab stops are set in every third column starting with
column 1, corresponding to a <tabs> specification of +3.
If <tabs> is omitted, the current tab spacing is
displayed in the status line.
selects the character that
se
displays in place of unprintable characters.
.mc |
On colour displays, the colour of the unprintable character
may be set independently of the colour of normal text.
.mc
<chr> may be any printable character; it is initially set to blank.
If <chr> is omitted,
se
displays the current replacement character on the status line.
sets the overlay column.
This is the column at which the cursor is initially
positioned by the v command.
<Col> must be a positive integer, or a dollar sign ($) to indicate
the end of the line.
If <col> is omitted,
the current overlay column is displayed in the status line.
The default overlay column is $.
Sets the warning threshold to <col> which
must be a positive integer, or a dollar sign ($) to indicate
the right-hand edge of the screen.
Whenever the cursor is positioned at or beyond this column,
the column number is displayed in the status line and the
terminal's bell
is sounded.
If <col> is omitted, the current warning threshold is displayed
in the status line.
The default warning threshold is $.
ox toggles the expansion of TAB characters into multiple
spaces in e and r commands.
By default,
se
pattern matching is case sensitive, that is, the pattern FOO
will not match the text foo.
In many cases, however, this is not desired; it prevents words that
occur at the beginning of a sentence from being matched.
Option oy reverses this behaviour, making pattern matching
insensitive to case.
oy toggles on and off with an explanatory message
in the status line.
On BSD Unix systems, this option puts
se
into the background.
Typing control-Z won't work because the editor responds to control
characters as commands.
This option has no effect on single-tasking operating systems.
splits the screen at the line specified by <lnr> which must
be a line number within the current window.
All lines above <lnr> remain frozen on the screen,
the line specified by <lnr> is replaced by a row of dashes,
and the space below this row becomes the new window on the file.
Further editing commands do not affect the
lines displayed in the top part of the screen.
If <lnr> is omitted, the screen is restored to its full size.
toggles the pattern indicator on the status line.
Se
always remembers the last pattern used in a search or substitute.
By typing o/, the remembered pattern is made visible on
the status line.
inverts the case of all letters you type (i.e., converts
upper-case to lower-case and vice versa).
This option causes
commands to be recognised only in upper-case and alphabetic line
numbers to be displayed and recognised only in lower-case.
toggles Insert mode.
Similar to the CTRL-A key, o_ is provided to allow users
to configure
se
to start up with insert mode turned on.
Some users find this preferable to overtype mode.
If the terminal is able to, the
shape of the cursor is changed when in insert mode.