Last active
January 30, 2019 09:09
-
-
Save mwfogleman/b5a9c9af0df43d703cff to your computer and use it in GitHub Desktop.
Org-Mode: Go to the heading of an element, so you can use speed commands
This file contains 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
; Speed commands are really useful, but I often want to make use of | |
; them when I'm not at the beginning of a header. This command brings | |
; you back to the beginning of an item's header, so that you can do | |
; speed commands. | |
(defun org-go-speed () | |
"Goes to the beginning of an element's header, so that you can | |
execute speed commands." | |
(interactive) | |
(when (equal major-mode 'org-mode) | |
(if (org-at-heading-p) | |
(org-beginning-of-line) | |
(org-up-element)))) | |
; bind-key comes from Use Package | |
(bind-key "C-c s" 'org-go-speed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment