I'm trying to indent my code in org src blocks, but it only works when evil-mode
is disabled. I have set this variables for org-mode:
(setq org-src-preserve-indentation t
org-src-tab-acts-natively t
org-src-fontify-natively t)
Now, in a org buffer, when I have a code like this:
#+BEGIN_SRC python
if True:
#+END_SRC
and press TAB
right below the if
, emacs idents my code properly. But, if I enable evil-mode
, it just doesn't work, even if I call org-cycle
manually.
Both with and without evil-mode
TAB
is bound to org-cycle
. The following picture shows the binding without evil:
My Emacs is version 25.3, and I've already tried emacs -q
, so it's probably not related to my setup. I'm aware I can use C-c '
to edit in another window, I'd prefer to do it in the org buffer.
F1 k
and include the output in your question. – wasamasa Mar 6 '18 at 22:52org-cycle
manually. – Jesse Mar 7 '18 at 0:09org-cycle
indent? Look up what should be called by checkingF1 k TAB
in that block with Evil deactivated. – wasamasa Mar 7 '18 at 6:41evil-mode
is disabled, invokingorg-cycle
manually works indents as intended. If, then, I enableevil-mode
and invokeorg-cycle
again, it doesn't indent anymore. I already checked, and both with and without evilTAB
points toorg-cycle
. – Jesse Mar 7 '18 at 11:42org-edit-special
. I've set up some quick bindings for evil so I can come and go fast enough, though it would be great if there was an actual solution for this. – Jesse Dec 28 '18 at 20:05