Created
November 24, 2015 13:38
-
-
Save lislon/dddd86ad1137f85ea187 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun my/org-metaright-or-evil-shift-right-advice (orig-func &rest args) | |
| "Overrides org-metaright if cursor is not at heading or item" | |
| (if (org-at-heading-or-item-p) | |
| (apply orig-func args) | |
| (call-interactively 'evil-shift-right)) | |
| ) | |
| (defun my/org-metaleft-or-evil-shift-left-advice (orig-func &rest args) | |
| "Overrides org-metaleft if cursor is not at heading or item" | |
| (if (org-at-heading-or-item-p) | |
| (apply orig-func args) | |
| (call-interactively 'evil-shift-left)) | |
| ) | |
| (advice-add 'org-metaright :around #'my/org-metaright-or-evil-shift-right-advice) | |
| (advice-add 'org-metaleft :around #'my/org-metaleft-or-evil-shift-left-advice) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment