Basic Emacs Commands

This file documents a very small subset of the commands for emacs. Most of the directions also apply to jove which is an emacs emulator.

The editor is most always in insert mode. In other words, you are always inserting characters into the file you are editing. Below you will see a list of key combinations on the left hand side and a description for what it does on the right.

To press shift, control, or meta characters, press and hold one of these keys and then press (but don't hold) the key you want to shift, control, or meta.

NOTE: Be careful about pressing and holding a key (whether it be c or control-c) because most keyboards will repeat the character which is not necessarily what you want to do.


key often labeled Shift that has special meaning. It is the key that capitalizes the character you are typing or gives you access to the characters at the top of the keys. To make an uppercase t you press 'shift-t' that is you press and hold the shift key and then press and release t.
key often labeled Ctrl that has special meaning. It is used like the shift key. To get a 'control-x' you press and hold the control key and then press and release x.

key often labeled Meta, Alt, Compose, <>, etc. that also has special meaning. Meta characters are used as "extended commands". For example 'Meta-k' (which means press and hold the meta key and then press k) kills a sentence.

If your keyboard doesn't have meta functionality then you can use the Escape key to simulate meta. 'Meta-k' can be executed by doing an 'Escape k' (press the escape key but release, don't hold it, and then press k).

Often labeled 'Delete' or '<-', this is designed to remove the key to the left of the cursor or the last key you pressed. Some terminals define backspace to send 'control-h'. The editor does not take kindly to this and thinks you want to get help. Your backspace key should send delete -- if it doesn't then see your documentation on how to change it to do so.
a single character: 'a', 'f', 'control-t', 'escape', 'z', 'meta-v' etc.
one or more key-strokes that makes up a command: 'escape z', 'control-x control-s'

Special Keys

cancels commands and most everything else
starts extended commands (or 'Escape x')

Normal Control Sequences

go to start of line
backwards character (left arrow may also work)
deletes the character the cursor is on
go to end of line
forward character (right arrow may also work)
extensive online help facilities. 'control-h t' gets you to the online tutorial.
kills the text from the cursor to the end of the line and puts it in the kill buffer (see control-y, yank). If the line is empty it removes it. control-k control-k removes a line.
redraws the screen
go down to the next-line (down arrow may also work)
open a line at the cursor (insert a return)
go up to the previous-line (up arrow may also work)
reverse search (search back through the file)
forward search (search forward through the file)
move down a page (the PageDown key may also work)
yanks the kill buffer. whenever you control-k (kill) something, it gets put into a "kill-buffer". Multiple kills append to the kill buffer. yank inserts the kill buffer at the cursor. To move a section from one spot in the file to another, first kill it with control-k's, then move to where you want it put and press control-y.
Undo the last action. control-/ may not work on some keyboards. 'control-x control-u' or 'control-_' may work instead.
move up a page (the PageUp key may also work)
backwards sentence (move to start of sentence)
forward sentence (move to end of sentence)
forward word (move to next word)
backwards word (move to last word)

Extended Control Sequences

control-x control-c
quit editor (it will stop you if you have not saved your file)
control-x control-f
find-file or edit another file. it will ask you for the file name.
control-x control-s
save the file

For More Info

Emacs has a very nice built help system including a build int tutorial. To get to the help system you start by pressing 'control-h' (press and release control-h). From there, to get to the tutorial you press a 't' (press and release t).

Free Spam Protection   ORMLite Java ORM   Android ORM   Simple Java Magic   JMX over HTTP