1

In Vim there is the virtualedit variable which can be set so that Vim allows the cursor to move past the end of the line always or only when in visual block mode. Is it possible to configure Emacs to do at least one of these?

picture-mode is not what I'm looking for because it inserts actual spaces.

I'm on Emacs 24.5 (from the Ubuntu package).

2

A common solution in general is to use artist-mode (I'm even wondering whether you accidentally tried picture-mode instead of this?)

In Emacs 25, rectangle-mark-mode has been improved such that you can do this by default, after invoking that with C-xSPC

For usage details, see C-hig (emacs) Rectangles

In Emacs 24 the cua-selection-mode rectangle editing (see this) allows you to extend the rectangle selection beyond the end of the lines.

Read the commentary in cua-base.el for the documentation on "CUA rectangle support".

  • picture-mode inserts spaces too, and neither one works with C-x SPC. I'll wait for version 25. Thanks for the answer :-) – Arch Stanton Sep 13 '16 at 15:20
  • artist-mode does not insert spaces. You can see this if you extend beyond the end of a line, and then C-a and C-e to jump to the beginning and end of the line. I see you're right in that this mode doesn't work with rectangle-mark-mode, however it works just fine with the original rectangle editing commands on the C-x r prefix. – phils Sep 13 '16 at 22:46
  • Yeah, I meant artist-mode in the comment. I used whitespace-mode to see if it had been inserting spaces, and it had been. I didn't see that the space is removed when the artist-mode is disabled. – Arch Stanton Sep 13 '16 at 23:24
  • I've just read a bit of CUA selection mode documentation. Nifty, thanks for the suggestion! – Arch Stanton Sep 16 '16 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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