Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable the ':' character in Vim

Tags:

vim

In my ~/.vimrc I have mapped ; to : so I don't have to press shift every time I want to enter a command and so I avoid typos like :W. I have mapped it using nnoremap ; :. My muscle memory is so strong however, is that I find myself frequently pressing : when I dont need to and I still get typos like :W.

How can I disable the : character completely and just use ; in normal mode?

like image 804
Zameer Manji Avatar asked Jan 19 '23 14:01

Zameer Manji


1 Answers

nnoremap ; :
nnoremap : <nop>

would be considered fairly harmless.

I don't need to point out that using this kind of setup will drive anyone trying to use your box nuts, and will render yourself crippled when at a random other UNIX console :)?...

like image 124
sehe Avatar answered Jan 25 '23 19:01

sehe