简体   繁体   中英

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. So what I did was the following:

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

When I hit F9, I get the following message back from 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.

Also if I use the command :NERDTreeToggle at any point from command mode, it works as well.

Any ideas?

Using @michaelmichael's and @romainl's suggestion, I was able to determine that I had a pluging overwriting the key .

Answer is... Debug it using :verbose map and then see if you need to disable it.

I had the same issue - had debugger.py and debugger.vim in the ~./vim/plugin directory. I removed these unused plugins and my mappings returned to normal.

Came to light after upgrading OS X to Mavericks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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