From 76a100e3a252f6208934e5eb94cf4df2d1689b6d Mon Sep 17 00:00:00 2001 From: EliasVincent Date: Sat, 21 Dec 2024 21:22:13 +0100 Subject: [PATCH] snippets! --- config.el | 8 ++++++++ snippets/org-mode/org-src-block.yaml | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 snippets/org-mode/org-src-block.yaml diff --git a/config.el b/config.el index 7163234..6c35c48 100644 --- a/config.el +++ b/config.el @@ -99,3 +99,11 @@ (add-hook 'web-mode-hook 'emmet-mode)) ; If you use web-mode (after! emmet-mode (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 diff --git a/snippets/org-mode/org-src-block.yaml b/snippets/org-mode/org-src-block.yaml new file mode 100644 index 0000000..72f653f --- /dev/null +++ b/snippets/org-mode/org-src-block.yaml @@ -0,0 +1,3 @@ +#+BEGIN_SRC ${1:lang} +${2:code} +#+END_SRC \ No newline at end of file