home *** CD-ROM | disk | FTP | other *** search
- [line] append
- args [files]
- cd [directory]
- chdir [directory]
- [line][,line] change
- [line][,line] copy line
- [line][,line] debug[!]
- [line][,line] delete ["x]
- edit[!] [file]
- ex[!] [file]
- file
- [line][,line] global /regexp/ command
- [line] insert
- [line][,line] join
- [line][,line] list
- map[!] key mapped_to
- [line] mark x
- mkexrc
- [line][,line] move line
- next[!] [files]
- Next[!]
- previous[!]
- [line][,line] print
- [line] put ["x]
- quit[!]
- [line] read file
- rewind[!]
- set [options]
- [line][,line] substitute /regexp/replacement/[p][g]
- tag[!] tagname
- undo
- unmap[!] key
- validate[!]
- version
- [line][,line] vglobal /regexp/ command
- visual
- wq
- [line][,line] write[!] [[>>]file]
- xit[!]
- [line][,line] yank ["x]
- [line][,line] ! command
- [line][,line] <
- [line][,line] =
- [line][,line] >
-
- TEXT ENTRY
- [line] append
- [line][,line] change ["x]
- [line] insert
-
- The (a)ppend command inserts text after the specified line.
-
- The (i)nsert command inserts text before the specified line.
-
- The (c)hange command copies the range of lines into a cut buffer,
- deletes them, and inserts new text where the old text used to be.
-
- For all of these commands, you indicate the end of the text you're
- inserting by hitting ^D or by entering a line which contains only
- a period.
-
- CUT & PASTE
- [line][,line] delete ["x]
- [line][,line] yank ["x]
- [line] put[!] ["x]
- [line][,line] copy line
- [line][,line] move line
-
- The (d)elete command copies the specified range of lines into a
- cut buffer, and then deletes them.
-
- The (y)ank command copies the specified range of lines into a cut
- buffer, but does *not* delete them.
-
- The (pu)t command inserts text from a cut buffer after the specified
- line -- or before it if the ! is present.
-
- The (co)py command yanks the specified range of lines and then
- immediately pastes them after some other line.
-
- The (m)ove command deletes the specified range of lines and then
- immediately pastes them after some other line. If the destination
- line comes after the deleted text, then it will be adjusted
- automatically to account for the deleted lines.
-
- DISPLAYING TEXT
- [line][,line] print
- [line][,line] list
-
- The (p)rint command displays the specified range of lines.
-
- The (l)ist command also displays them, but it is careful to make
- control characters visible.
-
- GLOBAL OPERATIONS
- [line][,line] global /regexp/ command
- [line][,line] vglobal /regexp/ command
-
- The (g)lobal command searches through the lines of the specified range
- (or through the whole file if no range is specified) for lines that
- contain a given regular expression. It then moves the cursor to each
- of these lines and runs some other command on them.
-
- The (v)global command is similar, but it searches for lines that
- *don't* contain the regular expression.
-
- LINE EDITING
- [line][,line] join
- [line][,line] ! program
- [line][,line] <
- [line][,line] >
- [line][,line] substitute /regexp/replacement/[p][g]
-
- The (j)oin command catenates all lines in the specified range together
- to form one big line. If only a single line is specified, then the
- following line is catenated onto it.
-
- The ! command runs an external filter program, and feeds the specified
- range of lines to it's stdin. The lines are then replaced by the
- output of the filter. A typical example would be ":'a,'z!sort -n" to
- sort the lines 'a,'z according to their numeric values.
-
- The < and > commands shift the specified range of lines left or right,
- normally by the width of 1 tab character. The "shiftwidth" option
- determines the shifting amount.
-
- The (s)ubstitute command finds the regular expression in each line,
- and replaces it with the replacement text. The "p" option causes
- the altered lines to be printed, and the "g" option permits all
- instances of the regular expression to be found & replaced. (Without
- "g", only the first occurrence is replaced.)
-
- UNDO
- undo
-
- The (u)ndo command restores the file to the state it was in before your
- most recent command which changed text.
-
- CONFIGURATION & STATUS
- map[!] [key mapped_to]
- unmap[!] key
- set [options]
- mkexrc
- [line] mark x
- visual
- version
- [line][,line] =
- file
-
- The (ma)p command allows you to configure Elvis to recognize your
- function keys, and treat them as though they transmitted some other
- sequence of characters. Normally this mapping is done only when in
- the visual command mode, but with the [!] present it will map keys
- under all contexts. When this command is given with no arguments,
- it prints a table showing all mappings currently in effect. When
- called with two arguments, the first is the sequence that your
- function key really sends, and the second is the sequence that you
- want Elvis to treat it as having sent.
-
- The (unm)ap command removes key definitions that were made via the
- map command.
-
- The (se)t command allows you examine or set various options. With
- no arguments, it displays the values of options that have been
- changed. With the single argument "all" it displays the values of
- all options, regardless of whether they've been explicitly set or
- not. Otherwise, the arguments are treated as options to be set.
-
- The (mk)exrc command saves the current configuration to a file called
- ".exrc" in the current directory.
-
- The mar(k) command defines a named mark to refer to a specific place
- in the file. This mark may be used later to specify lines for other
- commands.
-
- The (vi)sual command puts the editor into visual mode. Instead of
- emulating ex, Elvis will start emulating vi.
-
- The (ve)rsion command tells you that what version of Elvis this is.
-
- The = command tells you what line you specified, or, if you specified
- a range of lines, it will tell you both endpoints and the number of
- lines included in the range.
-
- The file command tells you the name of the file, whether it has been
- modified, the number of lines in the file, and the current line number.
-
- MULTIPLE FILES
- args [files]
- next[!] [files]
- Next[!]
- previous[!]
- rewind[!]
-
- When you invoke Elvis from your shell's command line, any filenames
- that you give to Elvis as arguments are stored in the args list. The
- (ar)gs command will display this list, or define a new one.
-
- The (n)ext command switches from the current file to the next one in
- the args list. You may specify a new args list here, too.
-
- The (N)ext and (pre)vious commands (they're really aliases for the same
- command) switch from the current file to the preceding file in the
- args list.
-
- The (rew)ind command switches from the current file to the first file
- in the args list.
-
- SWITCHING FILES
- edit[!] [file]
- tag[!] tagname
-
- The (e)dit command allows to switch from the current file to some other
- file. This has nothing to do with the args list, by the way.
-
- The (ta)g command looks up a given tagname in a file called "tags".
- This tells it which file the tag is in, and how to find it in that file.
- Elvis then switches to the tag's file and finds the tag.
-
- EXITING
- quit[!]
- wq
- xit
-
- The (q)uit command exits from the editor without saving your file.
-
- The (wq) and (x)it commands (really two names for the same command)
- both write the file before exiting.
-
- FILE I/O
- [line] read file
- [line][,line] write[!][[>>]file]
-
- The (r)ead command gets text from another file and inserts it after
- the specified line.
-
- The (w)rite command writes the whole file, or just part of it, to
- some other file. The !, if present, will permit the lines to be
- written even if you've set the readonly option. If you precede the
- filename by >> then the lies will be appended to the file.
-
- DIRECTORY
- cd [directory]
- chdir [directory]
- shell
-
- The (cd) and (chd)ir commands (really two names for one command)
- switch the current working directory.
-
- The (sh)ell command starts an interactive shell.
-
- DEBUGGING
- [line][,line] debug[!]
- validate[!]
-
- These commands are only available if you compile Elvis with the
- -DDEBUG flag.
-
- The de(b)ug command lists stats for the blocks which contain the
- specified range of lines. If the ! is present, then the contents
- of those blocks is displayed, too.
-
- The (va)lidate command checks certain variables for internal
- consistency. Normally it doesn't output anything unless it detects
- a problem. With the !, though, it will always produce *some*
- output.
-