2

Normal, insert, and visual modes restrict cursor movements to locations occupied by some characters. They don't allow moving to the right from the end of line and down beyond end of file.

For example:

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do          [x]
eiusmod tempor incididunt ut labore et dolore magna aliqua.              [y]
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris       [z]
nisi ut aliquip ex ea commodo consequat.

I'm curious

  1. How can I put the cursor at location [x] without adding the spaces manually?
  2. How can I select locations [x], [y], [z] in the visual block mode without having all the spaces on the left before selection?

And if it's possible with keyboard movements, is it possible with the mouse (as Option+Click in Terminal.app)?

2

1 Answer 1

2

You need to set virtualedit=all. The virtualedit option controls where you can edit outside of the actual text (there are other options). Read :help 'virtualedit' for more.

1
  • 1
    I wont CW this one because I came up with the answer independently of Christian’s comment :)
    – D. Ben Knoble
    May 19, 2020 at 18:34

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.