Is it possible to cancel the said behavior?
A task for extra credit: Figure out a way to force Vim to refresh the cursor position immediately after exiting Insert mode.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Although I would not recommend changing the default cursor mechanics,
one way of achieving the behavior in question is to use the following
Insert-mode mapping.
Here the Esc key is overloaded in Insert mode to additionally
run the
`^command which moves the cursor to the position where ithad been the last time Insert mode was left. Since in this mapping it
is executed immediately after leaving Insert mode with Esc,
the cursor is left one character to the right as compared to its
position with default behavior.
Unlike some other workarounds, this one does not require Vim to be
compiled with the
+ex_extrafeature.