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 |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access