Vim command line mode to invoke shell command mode (note)

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:

  1. :shell: Start a shell (enter exit to return to vim)
  2. :!{cmd}: Execute {cmd} in the shell
  3. :read !{cmd}: Execute {cmd} in the shell and insert its standard output under the cursor
  4. :[range]write !{cmd}: Execute {cmd} in the shell with [range] as its standard input
  5. :[range]!{filter}: Use the external program {filter} to filter the specified [range]
Published 314 original articles · won 28 · 130,000 views

Guess you like

Origin blog.csdn.net/qq_31433709/article/details/105546774