How to enter Vi / Vim command mode with `;` instead of `:`?

1

When using Vi or Vim, I need to perform the following sequence to save a file: esc + :s

But the : key is hard to reach on my keyboard. So I would like to switch : and ; so that I can type esc + ;s to save the file.

(I'm looking for a solution that works with every commands, not only to save a file)

Julien

Posted 2016-12-24T18:15:53.813

Reputation: 13

So why are you asking in a very specific manner for VI/VIM? You could try this to switch them around.

– Seth – 2016-12-28T12:39:27.560

Answers

3

nnoremap ; :

See also :help map.

user1686

Posted 2016-12-24T18:15:53.813

Reputation: 283 655

You will want to supplement that with the inverse nnoremap : ; so you still have the original functionality of ; available. – Aaron Thoma – 2016-12-26T10:16:52.620