简体   繁体   English

添加书呆子命令

[英]add nerdtree command

i wanto add a command in nodetree.我想在 nodetree 中添加一个命令。

for example if i press 'c' it has to execute 'o' command in NNERDTree and:AS command of alternateplugin in vim.例如,如果我按“c”,它必须在 NNERDTree 中执行“o”命令,并且:vim 中的备用插件的 AS 命令。

i tried to do some tries with nmap in vimrc but i didn't managed to do it我尝试在 vimrc 中使用 nmap 进行一些尝试,但我没有成功

This mapping should work to execute both commands:此映射应该可以执行两个命令:

nmap c o <Bar> :AS<CR>

<Bar> is used to separate multiple commands, allowing multiple commands on the same line. <Bar>用于分隔多个命令,允许多个命令在同一行。 See :help:\bar for details.有关详细信息,请参阅:help:\bar

I suggest that you avoid remapping c because c{motion} is a rather useful built-in vim command (see :help c for details).我建议您避免重新映射c因为c{motion}是一个相当有用的内置 vim 命令(有关详细信息,请参阅:help c

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM