Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map <c-leader> in vim?

Tags:

vim

keymapping

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)

like image 857
Arnis Lapsa Avatar asked Jul 04 '12 09:07

Arnis Lapsa


1 Answers

<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>
like image 65
Ingo Karkat Avatar answered Oct 02 '22 19:10

Ingo Karkat