->Title Page
->Intro
->Unix
->Vi editor
-->Basics
-->Vi reference
--->Move commands
--->Search
--->Undo
--->Insert
--->Delete
--->Changing text
--->Substitution
--->Yanking
--->Insert mode
--->Display commands
--->Files
--->Macros
->Shell commands
--->Vi Startup
--->Important options
-->Miscellaneous tips
->Mirror sites
->Further reading

[ Up ]
[Prev][Home][Next]
[Author]

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.

Please notify owners of webpages with outdated links to these pages

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

Find this site useful? Want to give something back?

© 1993-2001 Christopher C. Taylor