35

GitHub - dustinlacewell/org-spacer.el: Enforce the number of blank lines between...

 4 years ago
source link: https://github.com/dustinlacewell/org-spacer.el
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

org-spacer.el

This simple package allows you to enforce the number of blanks lines after elements in an org-mode document.

This package is experimental and might delete some contents of your buffer other than blank lines if there are bugs. Contribution is very welcome.

Installation

el-get

(el-get-bundle org-spacer
  :url "https://github.com/dustinlacewell/org-spacer.el.git"
  :features org-spacer)

straight.el

(use-package org-spacer
  :straight (org-spacer :type git :host github :repo "dustinlacewell/org-spacer.el")

Configuration

org-spacer-element-blanks

This variable controls which org elements you want processed and how many blank lines to enforce for each.

It is a list of lists. Each inner list’s car is the number of blanks. One or more org element symbols may follow:

(setq org-spacer-element-blanks
  '((0 headline)
    (1 paragraph src-block table property-drawer)))

Usage

Just execute M-x org-spacer-enforce to apply spacings.

Alternatively, add it to a before-save-hook:

(add-hook 'org-mode-hook
          (lambda () (add-hook 'before-save-hook
                          'org-spacer-enforce nil 'make-it-local)))

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK