

  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

![[ Up ]](tube-up.gif)
![[Prev]](tube-prev.gif) ![[Home]](tube-home.gif) ![[Next]](tube-next.gif)
![[Author]](tube-author.gif) |
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
|