LinuxCommandLibrary

Emacs

Basic usage

TAB Indent
C-w Cut
M-w Copy
C-y Paste ("yank")
C-SPACE Begin selection
C-s Search/Find
M-% (M-SHIFT-5) Replace
C-x C-s Save
C-x C-w Save as
C-x C-f Load/Open
C-x u Undo
C-x h Highlight all text
C-x d Directory listing
C-g Cancel a command
C-x C-+ Font size bigger
C-x C-- Font size smaller

Buffers

C-x 2 Split screen vertically
C-u 5 C-x 2 Split screen vertically with 5 row height
C-x 3 Split screen horizontally
C-u 24 C-x 3 Split screen horizontally with 24 column width
C-x 1 Revert to single screen
C-x 0 Hide the current screen
C-x o Move to the next screen
C-x k Kill the current buffer
C-x b Select a buffer
C-x C-e Run command in the scratch buffer

Navigation

C-b, C-f Character-wise
M-b, M-f Word-wise
C-p, C-n Line-wise
M-a, M-e Sentence-wise
M-{ , M-} Paragraph-wise
C-M-a, C-M-e Function-wise
C-a, C-e Line beginning / end

Other stuff

M-x eshell Open a shell
M-x goto-line Goto a line number
M-x toggle-word-wrap Word wrap
M-x flyspell-mode Spell checking
M-x linum-mode Line numbers
M-x visual-line-mode Toggle line wrap
M-x compile Compile some code
M-x package-list-packages List packages
Copied to clipboard