I vaguely remember I've read about this option and also tried it out, but I can't remember the name...
It allows using
l to move past the EOL, even though
$ still brings you to the EOL, not to the infinity to the right.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.Sign up to join this community
You want to set a value to
'virtualedit' 've' string (default "") global A comma separated list of these words: block Allow virtual editing in Visual block mode. insert Allow virtual editing in Insert mode. all Allow virtual editing in all modes. onemore Allow the cursor to move just past the end of the line Virtual editing means that the cursor can be positioned where there is no actual character. This can be halfway into a tab or beyond the end of the line. Useful for selecting a rectangle in Visual mode and editing a table. "onemore" is not the same, it will only allow moving the cursor just after the last character of the line. This makes some commands more consistent. Previously the cursor was always past the end of the line if the line was empty. But it is far from Vi compatible. It may also break some plugins or Vim scripts. For example because |l| can move the cursor after the last character. Use with care! Using the `$` command will move to the last character in the line, not past it. This may actually move the cursor to the left! The `g$` command will move to the end of the screen line. It doesn't make sense to combine "all" with "onemore", but you will not get a warning for it. NOTE: This option is set to "" when 'compatible' is set.