在由VIM打开的文本文件中,是否可以执行VIM命令?例如,我们有以下文本,希望能够在不输入命令:help w
的情况下执行它。
Read the text in the help window to find out how the help works.
Type CTRL-W CTRL-W to jump from one window to another.
Type :q <ENTER> to close the help window.
You can find help on just about any subject, by giving an argument to the
":help" command. Try these (don't forget pressing <ENTER>):
:help w
:help c_CTRL-D
:help insert-index
:help user-manual
:exec '!'.getline('.')
有什么不同?在VIM命令中,**.**是字符串连接运算符,在这些情况下它代表什么? - Vesnog:help expr-.
)。在命令后面加上一个“!”(exec!
)会返回“不允许使用!”因为只有特定的命令接受“!”。请参见:help _!
。 - builder-7000:help:!
。 - JoL