Can I use SPACE as mapleader in VIM?

Marlun picture Marlun · Jan 15, 2009 · Viewed 37.9k times · Source

From http://items.sjbach.com/319/configuring-vim-right I got that you were supposed to be able to use Space as the mapleader in vim. I've tried but it does not seem to work. Anyone who have made it work?

Tried:

let mapleader = <space>

Answer

Zsolt Botykai picture Zsolt Botykai · Jan 15, 2009

Try the following instead:

let mapleader=" "

And remember to write the following line before that, to make sure spacebar doesn't have any mapping beforehand:

nnoremap <SPACE> <Nop>