VIM - 在同一行上的多个命令 [英] VIM - multiple commands on same line
本文介绍了VIM - 在同一行上的多个命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在尝试找到一些东西,让我在vim的同一行上运行多个命令,类似于使用分号分隔* nix系统中的命令或&
在窗口。有办法吗?
I've been trying to find something that will let me run multiple commands on the same line in vim, akin to using semicolons to separate commands in *nix systems or &
in windows. Is there a way to do this?
推荐答案
A bar |
允许你这样做。 :help:bar
A bar |
will allow you to do this. From :help :bar
'| / code>可用于分隔命令,因此您可以在一个
行中给出多个命令。如果您想在参数中使用'|'
,请在其前加上'\'
。
示例:
:echohello| echogoodbye
输出:
hello
goodbye
注意:您可能会发现 〜/ .vimrc
不支持映射 |
或 \ |
。在这些情况下,请改用< bar>
。
NB: You may find that your ~/.vimrc
doesn't support mapping |
, or \|
. In these cases, try using <bar>
instead.
这篇关于VIM - 在同一行上的多个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文