I try to use org-mode as a replacement for jupyter notebook, and I was faced with a problem: when I edit a python src block, newlines don't indent properly, so I have to press space 4 times after pressing RET
.
I checked how the indentation works in elisp src blocks, it also works strange, see gif:
My org-mode config:
(use-package org
:ensure nil
:config
; (org-babel-jupyter-override-src-block "python")
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)
(add-to-list 'org-structure-template-alist '("p" . "src python"))
:custom
(org-startup-indented t)
(org-startup-with-inline-images t)
(org-src-tab-acts-natively t)
(org-src-preserve-indentation nil)
(org-edit-src-content-indentation 4)
(org-src-window-setup 'current-window)
(org-babel-load-languages '((emacs-lisp . t) (python . t))))
(use-package org-superstar
:hook (org-mode . (lambda () (org-superstar-mode 1))))
(use-package evil-org
:after (org evil)
:hook ((org-mode . evil-org-mode)
(evil-org-mode . (lambda ()
(evil-org-set-key-theme
'(navigation insert textobjects additional calendar))))))