Changing the Leader in MacVim?

Paul Wicks picture Paul Wicks · Sep 17, 2009 · Viewed 7.4k times · Source

I'm trying to change <Leader> in MacVim to be something less carpal-tunnel inducing. I have added this line

let mapleader=","

to my .gvimrc, but "\" is still the only key that works. Am I missing something?

Answer

too much php picture too much php · Sep 17, 2009

The line needs to go into your normal .vimrc (instead of .gvimrc). .gvimrc is not read until all plugins have been loaded, by which time all the mappings have already been created with the default map leader.

.gvimrc is intended only for GUI-specific options, everything else should be in .vimrc.