dotfiles/emacs/snippets/org-mode/header
2020-12-12 11:05:06 +08:00

14 lines
351 B
Plaintext
Executable File

# -*- mode: snippet -*-
# name: Org-Mode header
# key: header
# --
`(let* ((headerlevel (cl-gcd (read-number "What is the header level?: ")))
(str ""))
(if (= headerlevel 1)
(setq str (concat str (s-repeat 4 "\n")))
(setq str (concat str (s-repeat 2 "\n"))))
(setq str (concat str (make-string headerlevel ?*)))
str)` ${1:<HEADER>}
$0