-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplates
72 lines (52 loc) · 2.13 KB
/
templates
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
;; -*- mode: lisp -*-
fundamental-mode ;; available everywhere
(today (format-time-string "%Y-%m-%d"))
org-mode
(title "#+title: " p n "#+author: Patrick Elliott" n "#+language: en" n n)
(quote "#+begin_quote" n> r> n> "#+end_quote")
(example "#+begin_example" n> r> n> "#+end_example")
(center "#+begin_center" n> r> n> "#+end_center")
(comment "#+begin_comment" n> r> n> "#+end_comment")
(verse "#+begin_verse" n> r> n> "#+end_verse")
(src "#+begin_src " p n> r> n> "#+end_src")
(elisp "#+begin_src emacs-lisp" n> r> n "#+end_src")
(lingex "#+name: " p n> "#+begin_exe" n> "\\ex " r> n> "#+end_exe")
(rtxt "\\textcolor{red}\{" p "}")
;; awesomeblock snippets for org-mode
(note "#+begin_noteblock" n> r> n> "#+end_noteblock")
(tip "#+begin_tipblock" n> r> n> "#+end_tipblock")
(warning "#+begin_warningblock" n> r> n> "#+end_warningblock")
(caution "#+begin_cautionblock" n> r> n> "#+end_cautionblock")
(important "#+begin_importantblock" n> r> n> "#+end_importantblock")
(def "#+begin_definition" n> r> n> "#+end_definition")
(fact "#+begin_fact" n> r> n> "#+end_fact")
(box "#+begin_tcolorbox" n> r> n> "#+end_tcolorbox")
latex-mode
(env "\\begin{" (p "Environment: " environment) "}" > n>
r> n>
"\\end{" (s environment) "}" > n)
(begin "\\begin{" (s env) "}" > n> r "\\end{" (s env) "}")
(it "\\textit{" p "}")
(bf "\\textbf{" p "}")
(sc "\\textsc{" p "}")
(lingex "\\begin{exe}" > n> "\\ex " r> n "\\end{exe}")
(lingtree "\\begin{forest}"
>
n "[{" p "}"
n> "[{" p "}]"
n> "[{" p "}]"
n "]"
n "\\end{forest}")
emacs-lisp-mode
(lambda "(lambda (" p ")" n> r> ")")
(var "(defvar " p "\n \"" p "\")")
(const "(defconst " p "\n \"" p "\")")
(custom "(defcustom " p "\n \"" p "\"" n> ":type '" p ")")
(face "(defface " p " '((t :inherit " p "))\n \"" p "\")")
(group "(defgroup " p " nil\n \"" p "\"" n> ":group '" p n> ":prefix \"" p "-\")")
(macro "(defmacro " p " (" p ")\n \"" p "\"" n> r> ")")
(fun "(defun " p " (" p ")\n \"" p "\"" n> r> ")")
(let "(let (" p ")" n> r> ")")
(star "(let* (" p ")" n> r> ")")
(rec "(letrec (" p ")" n> r> ")")
(command "(defun " p " (" p ")\n \"" p "\"" n> "(interactive)" n> r> ")")