snippets!

This commit is contained in:
EliasVincent 2024-12-21 21:22:13 +01:00
parent 95fb7c92c7
commit 76a100e3a2
2 changed files with 11 additions and 0 deletions

View File

@ -99,3 +99,11 @@
(add-hook 'web-mode-hook 'emmet-mode)) ; If you use web-mode (add-hook 'web-mode-hook 'emmet-mode)) ; If you use web-mode
(after! emmet-mode (after! emmet-mode
(define-key emmet-mode-keymap (kbd "C-j") 'emmet-expand-line)) (define-key emmet-mode-keymap (kbd "C-j") 'emmet-expand-line))
;; Org Src block
(after! org
(define-abbrev org-mode-abbrev-table "osb"
'(lambda () (insert "#+BEGIN_SRC ")
(backward-char 13)
(insert "\n\n#+END_SRC")
(forward-char 13)))
(abbrev-mode 1)) ;; enable abbrev mode

View File

@ -0,0 +1,3 @@
#+BEGIN_SRC ${1:lang}
${2:code}
#+END_SRC