1.4 KiB
skex2
interactive line editor
skex2 is a simple but functional line editor for MultICE.
invocation
To start skex2, simply run skex(filename) from the Lua prompt.
usage
Generally, commands and arguments are entered in the form of command argument1 argument2 argument3
with the exception of inline execution, which is in the form of !lua code here
.
If skex does not understand what you mean, it will output a line with a question mark.
commands
q - quit skex2
Exits the program.
l [start] [end] - list contents
Output the lines from start to end, inclusive.
f [filename] - set the filename
This sets the filename to be used for I/O, or prints the current one.
r [filename] - load file
Reads from filename or the current set via f
w [filename] - write to file
Writes to filename or the current set via f
p [line] - print or set current line
As skex2 is a line editor, your pointer is a line, and this either prints the current one or sets a new one.
a [line] - append to buffer
Appends lines after the current line or line until a line with only . is entered.
i [line] - insert into buffer
Inserts lines before the current line or line until a line with only . is entered.
s [line] - replace line
Removes the current line or line and enters insert mode
e - executes the contents of the buffer
Basically converts it into one big string and loads it.