简体   繁体   English

VIM 标签列表打开/关闭

[英]VIM taglist toggle on/off

I'm using taglist in VIM and i have remapped F12 so that it will call:TaglistToggle我在 VIM 中使用 taglist 并且我重新映射了 F12 以便它将调用:TaglistToggle

nnoremap <F12> :TaglistToggle

is there a way that i can hit F12 and it will toggle the list on/off without having to hit return.有没有一种方法可以让我按 F12,它会打开/关闭列表,而无需按回车键。

At the moment F12 will just place the command TaglistToggle in the command buffer and then i have to hit return to carry out the command.目前 F12 只会将命令 TaglistToggle 放在命令缓冲区中,然后我必须按回车键来执行命令。

Thanks谢谢

put <CR> (which is interpreted as carriage return) behind it:<CR> (被解释为回车)放在它后面:

nnoremap <F12> :TaglistToggle<CR>

You can include keystrokes in the command as well:您也可以在命令中包含击键:

nnoremap <F12> :TaglistToggle<enter>

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

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