This article is part of the notes when reading vim practical skills
When operating in vim, we can easily call shell commands. Here are some of the most useful ways to call external commands:
:shell
: Start a shell (enter exit to return to vim):!{cmd}
: Execute {cmd} in the shell:read !{cmd}
: Execute {cmd} in the shell and insert its standard output under the cursor:[range]write !{cmd}
: Execute {cmd} in the shell with [range] as its standard input:[range]!{filter}
: Use the external program {filter} to filter the specified [range]