2022-02-11 07:57:32 +00:00
|
|
|
# -*- mode: snippet -*-
|
2022-09-18 11:47:49 +00:00
|
|
|
# name: Org Scaffold
|
2022-02-11 07:57:32 +00:00
|
|
|
# --
|
|
|
|
#+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]+"
|
|
|
|
)) " " )
|
|
|
|
`}
|
|
|
|
|
|
|
|
$0
|