feat: Added yasnippet + org-mode snippets, fixed typo in org-mode config

This commit is contained in:
phga 2025-04-26 23:26:29 +02:00
parent fca7618b90
commit 7f6860214e
Signed by: phga
GPG Key ID: 5249548AA705F019
12 changed files with 75 additions and 1 deletions

View File

@ -21,6 +21,17 @@
'(1 "=O" "Set push option" "--push-option="))
)
;; YASNIPPET: snippets
(straight-use-package 'yasnippet)
(straight-use-package 'yasnippet-snippets)
(require 'yasnippet)
(yas-reload-all)
;; hooks
(add-hook 'prog-mode-hook 'yas-minor-mode)
(add-hook 'org-mode-hook 'yas-minor-mode)
;; DICTCC: query dict.cc without leaving emacs
(straight-use-package 'dictcc)

View File

@ -238,7 +238,7 @@ modified here."
org-download-screenshot-method "grim -g $(slurp -b '#000000a0' -c '#00000000') -o %s"
org-download-image-attr-list '("#+ATTR_ORG: :width 600")
org-download-annotate-function (lambda(link) ""))
(setq-default org-download-image-dir "./ORGPICS"
(setq-default org-download-image-dir "./ORGPICS")
;; KEYBINDINGS
(my-leader

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: Larrow
# key: \L
# --
\Leftarrow

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: Rarrow
# key: \R
# --
\Rightarrow

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: clocktable
# key: <ct
# --
#+BEGIN: clocktable :scope file :compact t :emphasize t :lang de :link t :block week$0
#+END

8
snippets/org-mode/code Normal file
View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: code
# key: <s
# --
#+begin_src $1 :results output scalar
$0
#+end_src

7
snippets/org-mode/drill Normal file
View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: drill
# key: <d
# --
*** $1 :drill:
$2
**** Answer

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: folder-tree
# key: \tree
# --
beep/
├── mep
└── mop

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: larrow
# key: \l
# --
\leftarrow

5
snippets/org-mode/link Normal file
View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: link
# key: <l
# --
[[$1][$2]]

9
snippets/org-mode/output Normal file
View File

@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: output
# key: <o
# --
*OUTPUT:*
#+begin_example
$0
#+end_example

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: rarrow
# key: \r
# --
\rightarrow