localauthor / org-side-tree

Navigate Org-mode outlines in Emacs via side window

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

org-side-tree

https://melpa.org/packages/org-side-tree-badge.svg

This package presents a navigable, interactive tree-structured outline of the current buffer’s headings in a handy side window.

https://github.com/localauthor/org-side-tree/blob/main/images/screenshot1.jpg?raw=true

Installation

The easiest way to install is from MELPA.

Add org-side-tree.el to your loadpath and include (require 'org-side-tree) in your init file.

Call M-x org-side-tree in any Org mode buffer.

Some Customization Options

  • org-side-tree-persistent

When non-nil, use a single buffer for all trees. When nil, each buffer will have its own tree-buffer.

  • org-side-tree-display-side

Side of frame where tree-buffer will display.

  • org-side-tree-fontify

When non-nil, tree-buffer headings are fontified to match base-buffer. When nil, headings are in `org-side-tree-heading-face’.

  • org-side-tree-enable-folding

When non-nil, enable foldable headings in tree-buffers.

Note: This package simply turns on outline-minor-mode, it does not enable or alter any outline-related settings or keybindings. So, to use TAB for outline-visibility cycling, add the following to your config: (setq outline-minor-mode-cycle t).

Video Demo

Support for non-Org files

This package is generally functional in buffers that use outline-mode or outline-minor-mode. However, the depth and quality of support/functionality in these modes is highly dependent on what the buffer-local value of outline-regexp is. Therefore, individual experience may vary. Use advisedly.

For example, in emacs-lisp-mode, consider setting outline-regexp as follows:

(setq-local outline-regexp ";;;\\(;* [^ \t\n]\\)")

To set this automatically for every elisp buffer, add the following lines to your init file:

(add-hook 'emacs-lisp-mode-hook (lambda () (setq-local outline-regexp ";;;\\(;* [^   \t\n]\\)")))
(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)

About

Navigate Org-mode outlines in Emacs via side window

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%