Saturday, March 10, 2012

emacs undo redo and cursor movement

So you know that C-x u or C-_ will undo most recent change, but how to redo?
emacs keeps track of previous changes and as soon as there is a command other than undo, maybe C-f, then it thinks all previous changes are undoable.

So to redo, just type C-f or any command to interrupt the undo sequence, then the next undo will be redo.

Also for cursor movement, C-Space or C-@ will mark the current location, then C-u C-Space or C-u C-@ will return to this location. Esc-< back to top of buffer, and Ese-> to bottom of buffer.

C-x 2 gives two horizontally aligned windows and C-x 3 gives two vertically aligned windows.

Saving a position records a spot in a buffer so that you can move
back there later. Moving to a saved position reselects that buffer and
moves point to that spot.

`C-x r SPC R'
Save position of point in register R (`point-to-register').

`C-x r j R'
Jump to the position saved in register R (`jump-to-register').

To save the current position of point in a register, choose a name R
and type `C-x r SPC R'. The register R retains the position thus saved
until you store something else in that register.

The command `C-x r j R' moves point to the position recorded in
register R. The register is not affected; it continues to record the
same position. You can jump to the same position using the same
register any number of times.

No comments:

Post a Comment