diff --git a/dotfiles/doom.org b/dotfiles/doom.org index 67fb0bf..3ef0b68 100644 --- a/dotfiles/doom.org +++ b/dotfiles/doom.org @@ -1386,11 +1386,28 @@ when inside a source block. Otherwise, keep the normal behavior for ctrl-ent. Remap =C-c C-c=: https://emacs.stackexchange.com/questions/22430/rebind-org-babel-execute-src-block-maybe-to-c-c-c-c/22530#22530 +#+begin_src emacs-lisp + (defun tdh/ctrl-shit-ret () + (interactive) + (defun in-src-block-p () + "Returns t when the point is inside a source code block" + (string= "src" (org-in-block-p '("src")))) + + (if (in-src-block-p) + (tdh/org-babel-execute-goto-next) + (+org/insert-item-above))) + + (map! :map evil-org-mode-map + :n "" #'tdh/ctrl-shit-ret) +#+end_src + ** Library of Babel Add all named source blocks to =org-babel-library-of-babel=. #+begin_src emacs-lisp - (org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org") + (after! org-babel + (org-babel-lob-ingest "~/Cloud/thesis/org-mode/org-babel-tutorial/org-babel-library.org") + ) #+end_src ** Org-Babel Matlab