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全部的颜色,方便咱们来进行配色