lang/org: redo evil integration; add evil-org package

lang/org has now adopted much of evil-org, which introduces better evil
integration for org-mode. More testing is required.
This commit is contained in:
Henrik Lissner 2018-02-18 00:26:27 -05:00
parent 0b2a61593e
commit a01320deeb
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 53 additions and 52 deletions

View file

@ -203,25 +203,19 @@ wrong places)."
(evil-insert 1))))
;;;###autoload
(defun +org/shifttab (&optional arg)
"An alternative to `org-shifttab' which performs smart indentation if in
insert mode (evil). Otherwise, forwards to the original `org-shifttab'."
(defun +org/dedent ()
"TODO"
(interactive)
(cond ((org-at-table-p)
(call-interactively #'org-table-previous-field))
((and (bound-and-true-p evil-mode)
(evil-insert-state-p))
(cond ((org-at-item-p)
(org-list-indent-item-generic
-1 nil
(save-excursion
(when (org-region-active-p)
(goto-char (region-beginning)))
(org-list-struct))))
((org-at-heading-p)
(ignore-errors (org-promote)))
(t (call-interactively #'self-insert-command))))
(t (org-shifttab arg))))
(cond ((org-at-item-p)
(org-list-indent-item-generic
-1 nil
(save-excursion
(when (org-region-active-p)
(goto-char (region-beginning)))
(org-list-struct))))
((org-at-heading-p)
(ignore-errors (org-promote)))
((call-interactively #'self-insert-command))))
;;;###autoload
(defun +org/refresh-inline-images ()