emacs - 如何默认启用 org-indent-mode?

标签 emacs org-mode

我正在使用 Emacs 25.1.50.2

当我使用组织模式时,org-indent-mode默认关闭。所以我必须使用 M-x org-indent-mode 启用它每次。

我将下面的 lisp 放入我的配置文件 ~/.emecs.d/init.el没有效果。

;; Enable org-indent mode by default
(org-indent mode 1)
;; Above line really should be (org-indent-mode 1)

谢谢你的时间 :)

最佳答案

您可以在 org-mode 中使用主要模式的模式 Hook 来启用此缓冲区本地次要模式。缓冲区。

对于 Emacs 24+,您可以简单地编写:

(add-hook 'org-mode-hook 'org-indent-mode)

在早期的 Emacs 版本中,您应该使用自定义函数通过调用 (org-indent-mode 1) 显式启用次要模式。 ,然后将该自定义函数添加到钩子(Hook)变量中。

关于emacs - 如何默认启用 org-indent-mode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36416030/

相关文章:

emacs - 如何在 Windows 上启动时最大化 Emacs?

emacs - org-babel 中的 noweb 样式编织

emacs - Org-mode 在导出期间获取 src block 的内容

emacs - 我在 Windows 7 中的 Emacs 总是显示有关警告的启动错误

emacs - 过滤不包含特定 PROPERTY 的标题

emacs - 如何在 rspec 模式下运行 rspec?

emacs - 运行选择和替换

emacs - 如何在 Org 模式下制作不间断空格(连带)并正确导出到 LaTeX

emacs - 使用 org-babel 捕获 "diff"的输出

r - 动态计算参数值