Search code examples
vimkeymapping

How to map <c-leader> in vim?


I would like to map ctrl+leader key. Is it possible?

Tried: :nnoremap <c-leader> :CtrlP<CR>

And it does not work.

(ctrlp bindings conflict with yankring bindings)


Solution

  • <Leader> is a special key notation in Vim; as such, it cannot be combined with modifiers such as C-. Assuming the default setting for it (i.e. \), you can use this:

    nnoremap <c-\> :CtrlP<CR>