Changing modes shouldn't move the text cursor IMO. Any setting to disable this?
3 Answers
imap <silent> <Esc> <C-O>:stopinsert<CR>
Seems to work just fine :)
Also, set virtualedit=onemore needs to be set for best behavior.
I know this question is old but i figure a few people might enjoy this.
- 2,024
The cursor doesn't actually move. In command mode (what you refer to as escape mode) it is on the 3rd (for example) character, while when you go to insert mode, it is behind 3rd character.
It is only true it will move if while in insert mode, you go into replace mode (press "insert" button on your keyboard) :: then it will move to the right character of your current position (in this case, the 4th character).
- 24,289
I have been using vi, vim, and now gvim for over a decade, and I never noticed the shifting. I use i to insert and a to append, and my typing goes where I want. This may be a minor interface quirk that you will simply stop noticing after a short time.
You may prefer the settings recommended here:
How to make cut/copy/paste in GVim on Ubuntu work with Ctrl+X,Ctrl+C,Ctrl+V?
I know I do. These settings don't really address your issue, but if your vim/gvim experience is more familiar, you may not care so much about character shifting behavior.
One additional alternative: You might try the cream settings (http://cream.sourceforge.net/features.html). If you are using Ubuntu or Debian, there is a package you can install with apt-get/aptitude/synaptic (the package is named cream).
- 3,821