Cursor positioning when entering insert mode

Viewed 21974

When I switch to command mode in Vim, the cursor seems to move one character back when it's at the end of or on a word, and when I go to the end-of-line with $, it does not go to the actual end of line but one character before the end of the last word, and l ("el") does not move it forward and I have to use the arrow key to get there.

I haven't been able to find documentation of this behavior, but this seems strange to me. What's the reasoning behind this (for my own curiosity), and how can I get around it (or deal with it)?

7 Answers

pressing i will enter the insert mode before the cursor a after the cursor I before the first non empty character in the line A at the end of the line.

So, use A to quickly start typing at the end of the line.

Related