Org: snippets, improve maths, three new src header

This commit is contained in:
TEC 2021-03-26 03:08:13 +08:00
parent 6af9b3333c
commit bf823bc622
Signed by: tec
GPG Key ID: 779591AFDB81F06C
5 changed files with 20 additions and 2 deletions

View File

@ -2,6 +2,6 @@
# name: display math
# key: M
# condition: t
# expand-env: ((yas-after-exit-snippet-hook (lambda () (org-edit-special) (evil-insert-state) (insert "\n \n") (left-char))))
# expand-env: ((yas-after-exit-snippet-hook (lambda () (org-edit-latex-fragment) (evil-insert-state) (insert "\n \n") (left-char))))
# --
\\[`%`$0\\]

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: Header arg - noweb
# key: n
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :noweb "Evaluate: " '("no" "yes" "tangle" "no-export" "strip-export" "eval")))) (if out (concat ":noweb " out " ") ""))`$0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: Header arg - file
# key: f
# condition: (+yas/org-src-header-p)
# --
:file $0

View File

@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: Header arg - wrap
# key: w
# condition: (+yas/org-src-header-p)
# --
`(let ((out (+yas/org-prompt-header-arg :noweb "Wrap: " '("example" "export" "comment" "src")))) (if out (concat ":wrap " out " ") ""))`$0

View File

@ -2,6 +2,6 @@
# name: inline math
# key: m
# condition: t
# expand-env: ((yas-after-exit-snippet-hook (lambda () (org-edit-special) (evil-insert-state))))
# expand-env: ((yas-after-exit-snippet-hook (lambda () (org-edit-latex-fragment) (evil-insert-state) (goto-char 3))))
# --
\\(`%`$0\\)