Search code examples
vim

How do I map multiple <leader> keys in Vim?


I'd like to have a left-hand and right-hand leader key. If I want both the default \ and , to be my leaders, I thought it would be as simple as adding nnoremap , \ or nnoremap , <leader> to my .vimrc. But apparently not. How do I do this?


Solution

  • My <leader> is bound to , and this works for me:

    :nmap \ ,
    

    All of my leader mappings are now available using either \ or , as the leader. I think it's the nnoremap that's tripping you up.