Legend
Control key |
Ctrl |
Meta or Alt key on most keyboards |
Meta |
Super or the windows key on most keyboards |
Super |
Press two or more keys at the same time |
key1+key2 |
Press one key then press the other key |
key1 - key2 |
All keys are the default keys supplied by either Emacs or the package.
Links
General Emacs web sites that come in handy.
- EmacsWiki.org
-
The EmacsWiki is dedicated to documenting and discussing Emacs, XEmacs and EmacsLisp.
- GNU Emacs
-
Official Emacs Website.
Leaving Emacs
Suspend Emacs (or iconify it under X) |
Ctrl+z |
Exit Emacs permanently |
Ctrl+x Ctrl+c |
Files
Read a file into Emacs |
Ctrl+x - Ctrl+f |
Save a file |
Ctrl+x - Ctrl+s |
Save all Files |
Ctrl+x - s |
Insert contents of another file into this buffer |
Ctrl+x - i |
replace this file with the file you really want |
Ctrl+x - Ctrl+v |
write buffer to specified file |
Ctrl+x - Ctrl+w |
toggle read-only status of buffer |
Ctrl+x - Ctrl+q |
Movement keys
Item to move over | Backward | Forward |
---|---|---|
character |
Ctrl+b |
Ctrl+f |
word |
Meta+b |
Meta+f |
line |
Ctrl+p |
Ctrl+n |
go to line beginning or end |
Ctrl+a |
Ctrl+e |
sentence |
Meta+a |
Meta+e |
paragraph |
Meta+{ |
Meta+} |
page |
Ctrl+x - [ |
Ctrl+x - ] |
sexp |
Ctrl+Meta+b |
Ctrl+Meta+f |
function |
Ctrl+Meta+a |
Ctrl+Meta+e |
go to buffer beginning or end |
Meta+< |
Meta+> |
Scroll to next screen |
Ctrl+v |
|
scroll to previous screen |
Meta+v |
|
scroll left |
Ctrl+x - < |
|
scroll right |
Ctrl+x - > |
|
scroll current line to center, top, bottom |
Ctrl+l |
|
goto line |
Meta+g + g |
|
goto char |
Meta+g + c |
|
Back to indentation |
Meta+m |
Getting Help
Scroll help window |
Ctrl+Meta+v |
apropos: show commands matching a string |
Ctrl+h - a |
describe key or the function that the key runs. |
Ctrl+h - k |
describe a function |
Ctrl+h - f |
get mode-specific information |
Ctrl+h - m |
List all key binding |
Ctrl+h + b |
List prefix bindings. Press the prefix first |
Ctrl+h or F1 |
List value of a variable and its description |
Ctrl+h + v |
Error Recovery
Abort partially typed or executing command |
Ctrl+g |
Undo an unwanted change |
Ctrl+x - u, Ctrl+_ or Ctrl-/ |
restore a buffer to its original contents |
Meta+x - ‘revert-buffer’ |
redraw garbage screen |
Ctrl+1 |
Killing and Deleting
Item to kill | backward | forward |
---|---|---|
Character Delete, not kill |
DEL |
Ctrl-d or Backspace |
word |
Meta+DEL |
Meta+d or Meta+Backspace |
line to end of |
Meta+0 - Ctrl+k |
Ctrl-k |
sentence |
Ctrl-x - DEL |
Meta-k |
sexp |
Meta+- - Ctrl+Meta+k |
Ctrl+Meta+k |
Kill region |
Ctrl+w |
|
copy region to kill ring |
Meta+w |
|
Kill through next occurrence of char |
Meta+z - ‘char’ |
|
Yank back last thing killed |
Ctrl+y |
|
Replace last yank with previous kill |
Meta+y |
Marking
set mark here |
Ctrl+@ or Ctrl+Space |
exchange point and mark |
Ctrl+x - Ctrl+x |
set mark arg words away |
Meta-@ |
mark paragraph |
Meta+h |
mark page |
Ctrl+x - Ctrl+p |
mark sexp |
Ctrl+Meta+@ |
mark function |
Ctrl+Meta+h |
mark entire buffer |
Ctrl+x - h |
Buffers
Select another buffer |
Ctrl+x - b |
list all buffers |
Ctrl+x - Ctrl+b |
kill a buffer |
Ctrl+x - k |
Multiple Windows
Delete all other windows |
Ctrl+x - 1 |
Split window, above and below |
Ctrl+x - 2 |
Delete this window |
Ctrl+x - 0 |
Split window, side by side |
Ctrl+x - 3 |
Scroll other window |
Ctrl+Meta+v |
Switch cursor to another window |
Ctrl+x - o |
Incremental Search
Search forward |
Ctrl+s |
search backward |
Ctrl+r |
regular expression search |
Ctrl+Meta+s |
reverse regular expression search |
Ctrl+Meta+r |
select previous search string |
Meta+p |
select next later search string |
Meta+n |
exit incremental search |
Enter |
Undo effect of last character |
Delete |
abort current search |
Ctrl+g |
Use Ctrl+s or Ctrl+r to repeat the search in either direction.
In the Minibuffer
Complete as much as possible |
TAB |
Complete up to one word |
Space |
Complete and execute |
Enter |
Show possible completions |
? |
Fetch previous minibuffer input |
Meta+p |
Fetch later minibuffer input or default |
Meta+n |
Regexp search backward through history |
Meta+r |
Regexp search forward through history |
Meta+s |
Edit and repeat the last command that used the minibuffer |
Ctrl+x - Escape - Escape |
Activate menu bar items on text terminals |
F10 |