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)

  • So why are you asking in a very specific manner for VI/VIM? You could try this to switch them around. – Seth Dec 28 '16 at 12:39
nnoremap ; :

See also :help map.

  • You will want to supplement that with the inverse nnoremap : ; so you still have the original functionality of ; available. – Aaron Thoma Dec 26 '16 at 10:16

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.