Werden wir Helden für einen Tag

Home | About | Archive

My emacs cheatsheet

Posted on Sep 15, 2010 by Chung-hong Chan

近日用多了很多 emacs ,包括用來寫作及寫 code ,故寫下了最常用 80% 的 command 。在看 emacs 的書,指 emacs 與 vi 不同,各種 command 是 finger habit ,是肌肉記憶,和彈結他很似。亦因為 emacs 的按鍵常常多於三粒,書中還形容為 chords 。

Basic

C-x C-f 是 visit new file (可作 Open 及 New 用)
C-x C-s 是 Save
C-x C-c 是 Quit

Buffer

C-x 2 切開畫面上下兩份
C-x o 跳到另一 Buffer
C-x Arrow 是換畫
C-x k 是 Kill Buffer

Edit

C-_ Undo
C-@ Mark
Cx-h Select all
C-w Cut
M-w Copy
C-y Yank (Paste)
M-% Search & Replace (Space = Yes, ! = All, Return = No)

ESS - Emacs Speaks Statistics

M-x R Start R session

Process buffer:

M-p / M-n Command history
TAB Auto-completion (無乜用)

Difference between Eval (E) / Eval-go (EG)

(E) = Send code and return to code buffer
(EG) = Send code and switch to process buffer

Region (E) C-c C-r (EG) C-c M-r
Line (E) C-c C-j (EG) C-c M-j
Buffer (E) C-c C-b (EG) C-c M-b


Powered by Jekyll and profdr theme