Emacs builtin mode.

Table of Contents

learn from Emacs builtin modes 功能介绍.

winner-mode

记录窗体的变动。

  • C-c Left winner-undo
  • C-c Right winner-redo

saveplace

记录上次打开文件时光标的位置。

recentf

保存了历史访问的文件。

hl-line

高亮当前行。

repeat-mode

切换窗口 other-window 可以使用 C-x o o o 来切换。

newcomment

自带简单的注释与反注释功能。

hideshow

隐藏、显示结构化数据,如 { } 里的内容。

whitespace

显示空白字符,如 \t \f \v 空格等。

so-long

打开具有长行的文件,so-long 会自动检测并将一些可能导致严重性能的 mode 关闭。

glasses

将 CamelCasesName 显示成 Camel_Cases_Name 而不对原文件作出修改。

subword

Word 移动支持 FooBar 的格式。

follow-mode

delsel

(delete-selection-mode 1)

选中文本后可以直接输入。

parenthesis

高亮显示配对的 ( ) [ ] { } 括号。

simple

modeline 里显示行号、列号…

shell-command-on-region

autorevert

打开的文件在外部修改,可以自动更新。

isearch

tempo

align

变量的 = 对齐。

dired

ispell

全称是 interactive spell 检查器,支持 ispell,aspell 和 hunspell。

calendar

我在 google calendar 中查看日历。

strokes

鼠标控制 Emacs 的行为。

webjump

在 emacs 中快速调用搜索引擎搜索。

transient-map

transient-map 的优先级比其他的 keymap 要高,所以可以将它当菜单来使用。

如果 set-transient-map 用起来不方便,可以使用 hydra 代替。

type-break

汉诺塔动画。

timeclock

计算时间去哪里了的包。

org timeclock
org-clock-in timeclock-in
org-clock-out timeclock-out

elide-head-mode

将源代码文件头部中大量的 license 说明折叠起来。

midnight

晚上零点的时候定期执行一些任务,默认是 clean-buffer-list,可以设置 midnight-hook 来自定义行为。

term mode 相关应用

Emacs 下有几个类似终端模拟器,内置的有这 3 个:shell-mode,term-mode,eshell。

如果你不喜欢用 M-x compile 来编译,习惯在 shell-mode, term-mode, eshell 下直接使用 gcc 或者 make 来编译, 那么你可能需要compilation-shell-minor-mode。它可以识别报错,令错误可以点击,快速打开报错文件。自然在调用 M-x compile 的就是用的 compilation-mode 了。

  • term-mode
  • shell-mode
  • eshell

file cache

filesets

shadow files