Emacs Advent Calendar 06: Fixing Typos
Emacs comes with some useful commands to fix common typos.
Correcting case is done with
M-u. They apply case conversion from point to the end of the
convert to lower case and upper case respectively.
To correct the word before point, use
M-- ("M-minus") as a prefix.
Characters can be transposed with
C-t. The character behind point is
swapped with the character in front of/under point.
The same is true for words: The word in front of point is swapped with
the word behind point by pressing
To revert recent changes in a buffer the undo command is used. It is
C-x u and
C-/. After undoing the change,
point is moved to the position where it was before the change.
If a sequence of undos is broken by another command, the undo operations themselves are put on the undo stack and can be undone again.
If the region is active only changes inside are reverted.Tags: emacs
This text by Ludger Sandig is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.