简体   繁体   English

为什么当我使用重新映射的密钥访问插件命令时,vim为什么说“未连接”

[英]Why does vim say “Not Connected” when I use a remapped key to access a plugin command

I'm trying to use F9 to allow NERDTree to toggle. 我正在尝试使用F9来允许NERDTree切换。 So what I did was the following: 所以我做了以下事情:

nnoremap <silent> <F9> :NERDTreeToggle<CR>

When I hit F9, I get the following message back from vim 当我按F9时,我从vim返回以下消息

Not Connected
Not Connected

Press ENTER or type a command to continue

If I do :source ~/.vimrc , my remap for F9 works as expected and NerdTree is then toggled as expected. 如果执行:source ~/.vimrc source〜 :source ~/.vimrc ,则我对F9的重新映射按预期工作,然后按预期切换NerdTree。

Also if I use the command :NERDTreeToggle at any point from command mode, it works as well. 另外,如果我在命令模式下的任何位置使用命令:NERDTreeToggle ,它也可以正常工作。

Any ideas? 有任何想法吗?

Using @michaelmichael's and @romainl's suggestion, I was able to determine that I had a pluging overwriting the key . 通过使用@michaelmichael和@romainl的建议,我可以确定我有一个插头覆盖了密钥。

Answer is... Debug it using :verbose map and then see if you need to disable it. 答案是...使用:verbose映射对其进行调试,然后查看是否需要禁用它。

I had the same issue - had debugger.py and debugger.vim in the ~./vim/plugin directory. 我遇到了同样的问题~./vim/plugin目录中有debugger.pydebugger.vim I removed these unused plugins and my mappings returned to normal. 我删除了这些未使用的插件,并且我的映射恢复了正常。

Came to light after upgrading OS X to Mavericks. 将OS X升级到Mavericks后亮起。

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

相关问题 为什么Vim延迟这个重映射的密钥? 我该如何解决? - Why does Vim delay on this remapped key? And how do I fix it? 为什么VIM的 <Leader> 当我想使用bufexplorer或vim-buffergator插件时,键不起作用? - Why vim's <Leader> key not working when I want to use bufexplorer or vim-buffergator plugin? 如何重复以 VIM 中的前导键开头的重新映射命令? - How to repeat a remapped command thats starts with a leader key in VIM? 使用重新映射后,Vim光标会向前移动7个字符<Esc> - Vim cursor moves forward 7 characters when I use my remapped <Esc> 当我尝试撤消时,为什么vim总是说“已经是最早的变化”? - Why does vim always say 'Already at oldest change' when I try to undo? Vim不接受“领导者”键-超时设置,重新映射为“,”,但仅发出哔声 - Vim does not accept Leader key - timeout set, remapped to “,”, but yet only beeps 在Vim中用finger-finger时,“按我的意思,而不是我的意思” - “Do what I mean, not what I say” when fat-fingering the write command in Vim 维姆说“不是编辑命令:......” - Vim say “Not an editor command:…” 为什么vim几乎每个命令都使用寄存器? - Why does vim use registers for almost every command? 开始新的会话时,Vim为什么不使用我的密钥映射? - Why won't Vim use my key mapping when I start a new session?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM