Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out why MacVim does not pick up global mappings from installed plugins. I am using MacVim 7.3.87 under OS X 10.6.

I created a file ~/.vim/plugin/testplugin.vim containing the following:

nmap <D-x> :echo "hello"<cr>
nmap <C-x> :echo "hello"<cr>
nmap ,x :echo "hello"<cr>

Then I started MacVim using "mvim -V2" and verified by checking debug messages that testplugin.vim was sourced. Once it was up and running, I used the :nmap command to see all the normal-mode mappings but didn't see any mappings from testplugin.vim. Of course, those mappings do not work.

I noticed that the text-mode vim from MacPorts does pick up global mappings from this same testplugin.vim, so I'm wondering if MacVim specifically disables plugin global mappings.

share|improve this question
Maybe contact some the macvim developer? – Bjorn Tipling Jan 28 '11 at 21:11
Here is his blog: – Bjorn Tipling Jan 28 '11 at 21:12
He suggested to try the troubleshooting steps here: I'll do that on Monday. – mortonfox Jan 29 '11 at 10:42

I used the troubleshooting steps and figured out the problem. Thanks to Björn Winckler for the offsite advice. It turned out to be a conflict in the order in which config files were sourced. After the plugins were loaded, another file came in with "mapclear" and removed all the mappings.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .