dotfiles/emacs/snippets/org-mode/header
2022-07-07 11:37:52 +08:00

14 lines
351 B
Plaintext

# -*- 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