GNU Emacs Text Editor — Quick Reference

To open the GNU Emacs text editor, either launch it from your desktop environment's applications menu, or enter the shell command emacs at the terminal.

Unusual aspects

When placing the cursor with the mouse, you click in the centre of a character, not in between characters.
When selecting a region of text, you don't click and drag. Instead, click with the left mouse button on one character then click with the right mouse button on another.
Take note of the single blank line at the very bottom of the editor window: this is where commands will prompt you for input and give you feedback. You can use Ctrl + G to cancel a command if it is prompting you for input.


Note: commands labelled (*) are extensions provided by Biksel.


Ctrl + X, then Ctrl + C: quit
Ctrl + G: cancel command


drag and drop: open file
Ctrl + X, then Ctrl + F: create or open File
Ctrl + X, then Ctrl + S: Save
Ctrl + X, then S: Save all


Ctrl + /: undo
Ctrl + K: cut lines (press multiple times)
Ctrl + Y: paste lines
Left Mouse, then Right Mouse: copy region
Left Mouse, then Right Mouse twice: cut region
Middle Mouse: paste region


Alt + Up: scroll Up (*)
Alt + Down: scroll Down (*)
Ctrl + L: centre view around cursor
Ctrl + X, then 1: un-split window
Ctrl + X, then 2: split window vertically
Ctrl + X, then 3: split window horizontally
Ctrl + X, then O: move to Other subwindow
Ctrl + X, then B: switch to other open file


Ctrl + S: Search forward
Ctrl + R: search backward


Tab: re-indent line or region
Alt + Q: re-wrap comment paragraph


F5: build (*)
F6: run (*)
F7: build and run (*)
F8: open image editor (*)