mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-15 00:19:00 +00:00
![Gabriel Arazas](/assets/img/avatar_default.png)
As of 2021-04-12, org-mode is apparently standardized in lowercase so we'll follow that for the sake of future-proofing.
29 lines
891 B
Plaintext
29 lines
891 B
Plaintext
# -*- mode: snippet -*-
|
|
# name: Org template
|
|
# --
|
|
#+title: ${1:`
|
|
(string-join
|
|
(mapcar #'capitalize
|
|
;; Replace -,_... with space
|
|
(split-string
|
|
(let (case-fold-search)
|
|
;; Seperating lower from upper: hello|World
|
|
(replace-regexp-in-string
|
|
"\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2"
|
|
;; Separating upper from (upper and lower): HTTP|Server
|
|
(replace-regexp-in-string "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)"
|
|
"\\1 \\2" (file-name-base buffer-file-name))))
|
|
"[^[:word:]0-9]+"
|
|
)) " " )
|
|
`}
|
|
#+author: "`user-full-name`"
|
|
#+email: "`user-mail-address`"
|
|
#+date: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
|
#+date_modified: "`(format-time-string "%Y-%m-%d %T %:z")`"
|
|
#+language: en
|
|
#+options: toc:t
|
|
#+property: header-args :exports both
|
|
|
|
|
|
$0
|