dotfiles/emacs/snippets/org-mode/header

14 lines
419 B
Plaintext
Raw Normal View History

# -*- mode: snippet -*-
# name: Org-Mode header
2020-06-03 15:35:20 +00:00
# key: header
# --
2020-06-03 15:35:20 +00:00
`(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