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.

1 Answer 1


You want to set a value to virtualedit.
I do set virtualedit=all.

From :help virtualedit

'virtualedit' 've'  string  (default "")
    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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.