是否可以在由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发布于 2018-05-06 04:37:57
您可以创建以下映射来执行当前行中定义的命令:
nnoremap <c-e> :exe getline('.')<cr>将光标放在带有:help w的行中并键入Ctrl+E将打开帮助页。
https://stackoverflow.com/questions/50194766
复制相似问题