Skip to content

Instantly share code, notes, and snippets.

@citizen428
Created January 16, 2011 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save citizen428/781391 to your computer and use it in GitHub Desktop.
Save citizen428/781391 to your computer and use it in GitHub Desktop.

Help:

C-h t Tutorial
C-h m Help for active mode
C-h k Help for key sequence
C-h f Help for function
C-h v Help for variable
C-h a Search help
C-h i Info reader
C-h p Find help by keyword
M-x man Manpage reader
q Close help buffer

General:

C-c r Revert to file on disk
C-g Cancel

Movement:

C-f Next character
C-b Previous character
M-f Next word
M-b Previous word
C-a Beginning of line
C-e End of line

C-l Centers line on screen

C-n Next line
C-p Previous line
C-v Next page
M-v Previous page
M-< Beginning of document
M-> End of document

C-M-v Scroll other window/frame
C-M-f Move forward by s-expression
C-M-b Move backward by s-expression
C-M-d Move down list
C-M-u Move up list

M-g g Go to line
M-m Back to indentation
M-r Cycle top/center/bottom of visible window

Search:

C-s Forward search
C-r Backward search
C-s C-w Add word after point to search

Tags:

M-. Go to symbol definition
M-* Return to starting point
M-0 M-. Go to next matching definition
M-x tag-search Start a search
M-, Go to next match

Frames:

M-x make-frame New frame
M-x delete-frame Close frame

Windows:

C-x 0 Close window
C-x 1 Make current window only window
C-x 2 Split vertically
C-x 3 Split horizontally
C-x o Go to next window
Shift+arrow key Focus in direction
C-x M-f Open file in new window

Buffers:

C-x b Switch buffer
C-x C-b Buffer list
C-x k Kill buffer
C-y Send buffer to end of buffer list
C-x C-Right Next buffer
C-x C-Left Previous buffer

Copy/paste/delete:

C-SPC Set mark
C-x h Select whole buffer
M-h Select paragraph
C-w Kill region
M-w Copy region
C-y Paste from kill ring
M-y Cycle kill ring
C-k Kill text to end of line
C-M-h Kill previous word
C-u C-SPC Jump to last mark
C-_ Undo

File management:

C-x C-f Find file
C-x f Find recent file
C-x s Save file

Various:

C-x m Emacs shell
M-; (Un-)Comment region
M-/ Completion (Hippie Expand)
C-x C-i Ido function list
C-M \ Reindent region
C-c n Cleanup whitespace in ws mode
C-| Shell command on region
C-u C-| Like above, replace selection
C-u C-Spc Pop mark

Evaluate Elisp code:

C-c v Evaluate buffer
C-x C-e Evaluate last sexp

Ruby mode:

C-c C-s Start inf-ruby
C-C C-r Send region to inf-ruby
C-h r Search docs
C-x t Run Ruby file

Column mode:

M-x cua-mode Start column mode
C-Enter Selecting in column mode

Org-mode:

M-Shift-Ret Insert TODO item
C-c C-t Mark TODO as done
C-c C-o Open link
C-c l Store link
C-c C-l Paste link
C-c C-s Schedule task
Shift-Tab Document overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment