Zameer Manji
Zameer Manji

Reputation: 3025

Disable the ':' character in 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?

Upvotes: 4

Views: 258

Answers (1)

sehe
sehe

Reputation: 392911

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 :)?...

Upvotes: 10

Related Questions