Next: REPL, Previous: Aligning code, Up: Top [Index]
Emacs has a set of commands which operate on the region as if it were rectangular. This turns out to be extremely useful when dealing with whitespace sensitive languages.
It will shift any text within the rectangle to the right side. Also see:
It will replace any text within the rectangle with the given string on all the lines in the region. If comment-region didn’t already exist, you could use this instead, for example.
It will delete the contents of the rectangle and move anything on the right over.
It will prompt you for a register number so it can save it for later.
This will insert the contents of the given register, overwriting whatever happens to be within the target rectangle. (So make room)
Delete rectangle and save contents for:
This will insert the contents of the last killed rectangle.
As with all Emacs modifier combos, you can type C-x r C-h to find out what keys are bound beginning with the C-x r prefix.