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