Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM: unmap period key in normal mode [closed]

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!

like image 773
Goliathus Avatar asked May 01 '13 14:05

Goliathus


2 Answers

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

nnoremap . <NOP> 
like image 167
FDinoff Avatar answered Nov 14 '22 04:11

FDinoff


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.

like image 1
sidyll Avatar answered Nov 14 '22 05:11

sidyll