ZYF

Tag: emacs

when will sun rise?

Harbin
M-x sunrise-sunset
Sun, May 27, 2007
Sunrise 3:55am (+0800), sunset 7:09pm (+0800) at 45.5N, 126.4E (15:14 hours daylight)
可黎明前的黑暗让人窒息了

Narrowing

Emacs中的Narrowing是指在buffer中显示其一部分内容,而其他内容是不可见的、不能访问、不能编辑。这种功能主要是为了专注于编辑某一个部分,而不希望不小心弄乱了其他部分。
最常用的方式是 C-x n n 也就是 narrow-to-region
撤销narrowing可以使用命令 widen 对应的快捷键为 C-x n w
这个功能在编辑长文档的时候挺有用的,不过很可能让人迷惑。注意modeline上会有“Narrow“字样提示。

Emacs中进行列操作

cua-mode对于模拟UE中的列操作非常方便,可以一试。选中一个区块,然后剪切、粘贴,或者插入相同字符,简直如探囊取物般。
M-x cua-mode
Rectangles
如果不使用cua-mode,可以用Emacs自带的rectangle操作功能。rectangle的命令以 C-x r开头,后面跟上不同的字符表示不同的操作。如果记不住具体命令可以使用 C-x r C-h 调出帮助来看。也可以进入info的Rectangles节点查看命令。

C-x r k Kill the text of the region-rectangle, saving its contents as the “last killed rectangle” (kill-rectangle).

C-x r d Delete the text of the region-rectangle (delete-rectangle).

C-x r y Yank the last killed rectangle with its upper left corner at point (`yank-rectangle’).

C-x r o Insert blank [...]