Expand region increases the selected region by semantic units. Just keep pressing the key until it selects what you want.html
An example:python
With the cursor at the , it starts by marking the entire word , then expand to the contents of the quotes , then to the entire quote ,
then to the contents of the sexp and finally to the entire sexp.(setq alphabet-start "abc def")cabcabc def"abc def"setq alphabet-start "abc def"
(add-to-list 'load-path "mark-multiple.el所在目錄") (require 'mark-more-like-this) (global-set-key (kbd "C-<") 'mark-previous-like-this) (global-set-key (kbd "C->") 'mark-next-like-this) (global-set-key (kbd "C-M-m") 'mark-more-like-this) ; like the other two, but takes an argument (negative is previous) (global-set-key (kbd "C-*") 'mark-all-like-this)
配合desktop能夠保存咱們上一次的工做狀態。也就是從新打開Emacs的時候,會變成上次關閉的狀態。固然也能夠 分項目保存不一樣的session ,這樣就和IDE保存工做區同樣了。git
Emacs的undo很是詭異,只有undo,沒有redo。若是要redo,那只有undo undo。github
不過這樣的設計,讓Emacs的撤銷變得異常強大。Emacs能夠幫你全部的修改記錄都保存下來,咱們能夠肆意地修改、undo完修改,各類修改,咱們均可以回到曾經的狀態。這個是其餘編輯器難以作到的。shell
undo-tree能夠將全部的狀態用樹狀結構繪製出來。而後咱們輕鬆地能夠找到咱們須要的狀態,甚至能夠diff不一樣的狀態。vim
咱們按 C-x u
能夠進入undo-tree-visualizer-mode, 而後 p
、 n
上下移動,在分支以前 b
、 f
左右切換, t
顯示時間戳, d
打開diff,選定須要的狀態後, q
退出。這是主要的操做,其它的本身摸索好了……session
C-M-h
標記一個函數定義C-h C-a
about-emacsC-h C
查看當前文件的編碼C-u M-! date
插入當前時間C-u M-=
計算整個緩衝區的行數、字數和單詞數C-x <RET> f utf-8
(set-buffer-file-coding-system),設置當前buffer的文件的編碼C-x C-+
and C-x C--
to increase or decrease the buffer text font sizeC-x C-q
開關read-only-mode,在dired-mode中能夠進入修改模式,能夠批量修改文件名。C-x C-t
交換兩行。能夠用來調整python中importM-x sort-lines
排序選中行。C-x C-v
or M-x find-alternate-file
從新打開當前文件,在高亮後者插件出了bug能夠用這個命令從新加載。C-x z
重複上一條命令。能夠一直按 z
不斷執行,很是方便!M-&
異步運行一個shell命令M-:
運行一句lispM-@
mark-word,連續按連續mark單詞。M-g M-g linenum
跳到某行,同vim中的 [linenum]G
M-h
標記一段M-x dig
M-x ifconfig
M-x ping
M-x telnet
M-z
刪除到某個字符,同Vim的 df
C-u M-! date
插入當前時間C-q C-i
插入tabM-x list-colors-display
顯示Emacs全部的顏色,方便咱們來進行配色