سؤال

I try to use the EasyMotion plugin, but I don't want to use the normal leader key, which is the \-key in my case. I also don't intend to change the leader key all together, as it might break things in vim-latex.

So I thought about using the period-key for this (I am already using the comma-key for going into command-line mode), because I never really use its repeat feature:

This is what I have tried so far in my .vimrc:

nunmap .
let g:EasyMotion_leader_key = '.'

The second command works just fine as it seems. But I can't unbind the period key with the first command (E31: No such mapping). If I am wrong with only wanting to unbind the period-key in normal mode, then feel free to correct me.

Any ideas are appreciated!

هل كانت مفيدة؟

المحلول

You can disable the dot from working in normal mode by using

nnoremap . <NOP> 

نصائح أخرى

The error says it all. There is no such mapping. nunmap is used to remove user maps, and . is a built-in command, not a map, so you don't really unmap it…

It's a bit unclear, but if it works as the desired leader, then you can just remove the line unmapping .. It's not needed.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top