CMSC 341 - Basic (X)Emacs Commands

Note that the Meta key shown below is typically the Alt key on most modern terminal emulators.

Commands

Meta + v
Move backward one screenful

Ctrl + l
Clear screen and redisplay everything (re-centers the screen)

Ctrl + p
Move to the previous line

Ctrl + n
Move to the next line

Ctrl + b
Move backward one character

Ctrl + f
Move forward one character

Ctrl + d
Delete one character

Ctrl + k
Kill from the cursor position to end of line

Ctrl + y
To yank the lastly killed text back

Ctrl + a
Move to the begining of the line

Ctrl + e
Move to the end of the line

Meta + k
Kill to the end of the current sentence

Meta + f
Move forward one word

Meta + b
Move backward one word

Meta + a
Move to the begining of the sentence

Meta + e
Move to the end of the sentence

Meta + <
Move to the begining of the file

Meta + >
Move to the end of the file

Meta + d
Kill the next word after the cursor

Ctrl + x , u
Undoes one command’s worth of changes

Ctrl + x , Ctrl + s
Save the file

Ctrl + x , Ctrl + w
Write to the file

Ctrl + x , Ctrl + f
Retrieve/open a file

Ctrl + u , n , Ctrl + f
Move forward ‘n’ characters (n should be a number)

Ctrl + x , Ctrl + c
Save file and exit