uTools-Manuals/docs/vim/外部命令.html
2019-04-21 11:50:48 +08:00

12 lines
835 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div>
<h1>外部命令</h1>
<pre>
<span id=":!ls">:!ls</span> <span>运行外部命令 ls并等待返回</span>
<span id=":r !ls">:r !ls</span> <span>将外部命令 ls 的输出捕获,并插入到光标后</span>
<span id=":w !sudo tee %">:w !sudo tee %</span> <span>sudo以后保存当前文件</span>
<span id=":call system('ls')">:call system('ls')</span> <span>调用 ls 命令,但是不显示返回内容</span>
<span id=":!start notepad">:!start notepad</span> <span>Windows 下启动 notepad最前面可以加 silent</span>
<span id=":sil !start cmd">:sil !start cmd</span> <span>Windows 下当前目录打开 cmd</span>
<span id=":%!prog">:%!prog</span> <span>运行文字过滤程序,如整理 json格式 :%!python -m json.tool</span>
</pre>
</div>