Skip to content

Instantly share code, notes, and snippets.

@swrogers
Last active August 14, 2020 14:21
Show Gist options
  • Save swrogers/e1052cc5912a5cbbfc0416a12a4b5b91 to your computer and use it in GitHub Desktop.
Save swrogers/e1052cc5912a5cbbfc0416a12a4b5b91 to your computer and use it in GitHub Desktop.
My EMACS Notes

Movement

  • Page Movement
C-v page down
M-v page up
C-l center line / top of screen / bottom of screen
  • Cursor Movement
C-p - previous line
C-n - next line
C-b - cursor backward
C-f - cursor forward
M-b - cursor back full word
M-f - cursor forward full word
C-a - cursor to beginning of line
C-e - cursor to end of line
M-a - cursor to beginning of sentence
M-e - cursor to end of sentence
M-< - beginning of file
M-> - end of file

Editing Commands

(note, 'kills' can be yanked back)

C-d - delete char
M-d - kill next word
M-<DEL> - kill prev word
C-k - kill from cursor to end of line
M-k - kill from cursor to end of sentence
C-<space> - set a beginning mark
C-w - kill to mark
C-y - yank text back
M-y - cycle through yank'ed text
C-/ - undo

File Commands

C-x C-f - find file
C-x C-s - save file
C-x s - save buffers without switching to them
C-x C-b - list buffers
C-x b <buffername> - switch to buffername

C-x C-c - close emacs

C-u # - repeat next command # times (example C-u 5 C-n cursor down 5 times) C-g - cancel command entry

Window-ing Commands

C-x 1 - kill other windows
C-x o - select cursor to other window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment