->Title Page
->Vi editor
-->Vi reference
--->Move commands
--->Changing text
--->Insert mode
--->Display commands
->Shell commands
--->Vi Startup
--->Important options
-->Miscellaneous tips
->Mirror sites
->Further reading

[ Up ]

Vi ---> Switch and shell commands

    Q | ^\ | <intr><intr>   | Switch from vi to `ex'.
    :                       | An `ex' command can be given.
    :vi                     | Switch from `ex' to vi.
    :sh                     | Execute a subshell, back to vi by `^D'.
    :[x,y]!<cmd>            | Execute a shell <cmd> [on lines x through y;
                            |   these lines will serve as input for <cmd> and
                            |   will be replaced by its standard output].
    :[x,y]!! [<args>]       | Repeat last shell command [and append <args>].
    :[x,y]!<cmd> ! [<args>] | Use the previous command (the second `!') in a
                            |   new command.
    [*]!<move><cmd>         | The shell executes <cmd>, with as standard
                            |   input the lines described by <*><move>,
                            |   next the standard output replaces those lines
                            |   (think of `cb', `sort', `nroff', etc.).
    [*]!<move>!<args>       | Append <args> to the last <cmd> and execute it,
                            |   using the lines described by the current
                            |   <*><move>.
    [*]!!<cmd>              | Give <*> lines as standard input to the
                            |   shell <cmd>, next let the standard output
                            |   replace those lines.
    [*]!!! [<args>]         | Use the previous <cmd> [and append <args> to it].
    :x,y w !<cmd>           | Let lines x to y be standard input for <cmd>
                            |   (notice the <sp> between the `w' and the `!').
    :r!<cmd>                | Put the output of <cmd> onto a new line.
    :r <name>               | Read the file <name> into the buffer.

Site Statistics

This section is based on "Vi Reference" by Maarten Litmaath et al.

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor