.vimrc I have
set virtualedit=all and
set nostartofline. I'd like to have these features in Emacs. Can it be done?
virtualedit allows the cursor to be positioned where there are no characters, not even whitespace. It allows you to scroll horizontally beyond any text. If you scroll vertically one row at a time then the cursor always goes up one row and does not change the column it is in, regardless of the contents of the row. If the cursor is beyond the characters in a row and you insert a character, spaces are filled in to the left of the inserted character.
nostartofline also set, the cursor does not go to the start of the line if I use movements that jump by multiple rows, for example, jumping to the start or end of a file.
With both options set, I can place the cursor, possibly beyond any text in the file, and jump vertically without the column of the cursor changing. A command to move the cursor to the "end of the line" will jump to the last character. So if the cursor is way off in the middle of nowhere,
$ will actually move the cursor left instead of right.
There is another question that mentions Vim's
virtualedit but it is concerned with making rectangular selections. This question is concerned with the movement of the cursor and the behavior of inserting spaces to catch up to inserted characters.