0

When we go from INSERT mode to NORMAL/COMMAND mode by pressing the Esc key, the cursor shifts one position back.

I don't want this to happen. I want the cursor to be where it is even after I change into COMMAND mode.

mtk
  • 13,221
  • 16
  • 72
  • 112
Pavan Manjunath
  • 27,404
  • 12
  • 99
  • 125
  • See http://stackoverflow.com/questions/2295410/prevent-cursor-from-moving-back-one-character-on-insert-mode-exit – Stefan May 25 '12 at 14:35

1 Answers1

1

This behavior comes from good ol' vi. To change it:

:inoremap <Esc> <Esc>g`^
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324