Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unmapping Vim Plugin mappings

Tags:

vim

Is there a way to unmap mappings set by plugins? I'm currently calling exe ":mapclear" before my custom mappings in my .vimrc file, but the plugin files appear to be sourced after the vimrc file does. I have to resource my vimrc file again for it to work as expected.

I'm using Pathogen for sourcing plugins, which are all contained in my ~/.vim/bundle folder.

like image 381
wlue Avatar asked Jan 09 '11 02:01

wlue


1 Answers

You could write the part with the mappings in your .vimrc in another file, say MyMaps.vim, and put this file in ~/.vim/after/plugin/. This should make your maps the default ones

Look also at the documentation of the plugins setting the mappings, some of them allow you redifine or deactivate the default mappings.

like image 165
skeept Avatar answered Nov 03 '22 19:11

skeept