How to keep indentation with Emacs + org-mode + visual-line-mode?

只谈情不闲聊 提交于 2019-12-08 22:53:11

问题


Emacs + org-mode + visual-line-mode + window resizing produce this kind of view :

* My list
  * Some thing this is longer
back to line which is really
anoying
  * Other thing which is
truncated
    * Sub items with blah
to line

I would rather prefer this :

* My list
  * Some thing this is longer
    back to line which is 
    really anoying
  * Other thing which is
    truncated
    * Sub items with blah
      to line

Any clue about how to configure emacs or org-mode to achieve that would be really really appreciated :)

(emacs23.1 on ubuntu karmic)


回答1:


For a new enough version of org-mode, M-x customize-variable org-indent-mode should do. There's a recent fix reconciliating org-indent-mode with visual-line-mode.




回答2:


Activate org-indent-mode. One way is to add a hook

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

but the easier way is to customize org-startup-indented to be non-nil.

Note that even when org-indent-mode is non-nil, headlines still don't enjoy auto-fill treatment. It's only the body of an entry that will be both filled and indented left-justified against its parent heading's left column.



来源:https://stackoverflow.com/questions/1771981/how-to-keep-indentation-with-emacs-org-mode-visual-line-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!