Home » Questions » Computers [ Ask a new question ]

When going from insert to escape mode in Vi or Vim, is there a way to not have it move the cursor left one space?

When going from insert to escape mode in Vi or Vim, is there a way to not have it move the cursor left one space?

Changing modes shouldn't move the text cursor IMO. Any setting to disable this?

Asked by: Guest | Views: 71
Total answers/comments: 1
Guest [Entry]

"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."