Sammanfattning: Mention EmacsKeyNotation
> * EmacsKeyNotation -- Explain the convention of Emacs key sequences found below.
< * CategoryReferenceSheet -- More key lists.
> * ReferenceCards, CategoryReferenceSheet -- More key lists.
< CUA keys are available with CuaMode, this includes `C-c', `C-x', `C-v' and `C-z' and visible region selection. This mimics the familiar behavior found on in Windows, Mac and Motif. *Note*: If region is not active -- no visible selection -- then `C-x' works as it as it does normally in Emacs (without cua-mode).
< On the other hand if the region is active you can use C-S-x (or two rapid C-x C-x) instead C-x to do what C-x normally does in Emacs.
< The same goes for the other CUA keys.
< See cua-mode help for more information.
> CUA keys are available with CuaMode, this includes `C-c', `C-x', `C-v' and `C-z' and visible region selection. This mimics the familiar behavior found on in Windows, Mac and Motif.
This is a reference for an EmacsNewbie of commonly used Emacs key sequences. See also:
Buffers and Windows
- Open a file, existing or new:
‘C-x C-f’ – then type the file name.
- Save Buffer:
- Save buffer as a different file (Save As):
- Save all open buffers:
- Insert a file into buffer:
- Kill current buffer and open another file:
- Kill (close) a buffer:
- Split Window:
‘C-x 2’ or
- Unsplit windows (maximize selected window, within its Frame):
- Select next window:
- Switch to another buffer:
- Buffer menu (list of buffers):
‘C-x C-b’ – save, delete, open rename buffers
These commands move the TextCursor and Point:
- Forward a character:
- Backward a charcter:
- Forward a line:
- Backward a line:
- Go to the beginning of the line:
- Go to the end of the line:
- Forward a word:
- Backward a word:
- Forward a sentence:
- Backward a sentence:
- Go to the beginning of the buffer:
- Go to the end of the buffer:
- undo: C-x u, C-_, C-/, or from the menu:
‘Undo’. You’ve undone all changes when the mode line shows
‘--’ instead of
- redo: after undo, C-g and then C-x u
- undo unsaved changes to a buffer: M-x revert-buffer
See also: [[Undo?]].
- cancel current operation:
- if that doesn’t happen to work (abort or exit recursive edit):
See also: CancelingInEmacs.
- Indent current line: TAB
- Shift a block of lines rigidly right or left: C-x TAB
- Fill (justify) paragraph: `M-q;
- Add a new line after this one:
- Open a new line before this one:
- Remove all but 1 empty line:
- Remove all but 1 space:
See also: Indentation and Filling.
- Delete character backward:
- Delete character forward:
- Delete word backward:
- Delete word forward:
- Delete to end of line:
- Delete entire line:
- Delete to end of sentence:
Selecting and Modifying Regions
Copy, cut, paste, select all, …
- Set mark:
- Select entire buffer:
- Select page:
- Exchange TextCursor position (Point) and Mark:
- Copy text after setting mark:
- Cut text after setting mark:
- Paste (“yank”) text:
- Replace just pasted text with text copied or cut earlier:
See also: Region.
Other Simple Editing
- Make word uppercase:
- Make word lowercase:
- Capitalize word (first character):
- Transpose (swap) adjacent characters:
- Transpose adjacent words:
- Transpose lines:
- Move line 2 lines forward:
‘C-u 2 C-x C-t’
- Join previous line: `
- Join next line: `
Repeating Previous Commands
- Repeat the most recent command:
‘C-x z’, and again with
- See the recent commands (displayed in EmacsLisp):
‘M-x list-command-history’. Rerun a command by hitting
‘x’ on the line containing a command.
- RepeatingComplexCommand allows you to choose which previous command as EmacsLisp and even modify it.
- Recenter the screen at the TextCursor:
- Center the screen at the top:
‘C-0 C-l’ or
‘C-u 0 C-l’
- Recenter the screen at the bottom:
‘C-- C-l’ or
‘C-u - C-l’
Common User Access (CUA) Keys
CUA keys are available with CuaMode, this includes
‘C-z’ and visible region selection. This mimics the familiar behavior found on in Windows, Mac and Motif.
vi keys are available with ViperMode.
CategoryReferenceSheet CategoryHelp CategoryKeys