Interacting with the Shell
Command |
Action |
:r |
Read in contents of file after cursor. |
:r ! |
Read in output from |
:nr ! |
Like preceding, but place after line |
:! |
Run |
!object |
Send object, indicated by a movement command, as input to shell command |
:n1,n2! |
Send lines |
n!! |
Send |
!! |
Repeat last system command. |
!! |
Replace current line with output of |
:sh |
Create subshell; return to file with EOF. |
Ctrl-Z |
Suspend editor; resume with fg. |
:so |
Read and execute ex commands from |
Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.