Last active
April 27, 2018 21:15
-
-
Save simonmichael/b1e90690e73a933c49d9 to your computer and use it in GitHub Desktop.
useful org-mode keybindings
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
; quick level-of-detail control for org (or orgstruct) mode | |
; M-N shows all nodes to depth N. M-0 shows all nodes and their content. | |
(eval-after-load "org" '(progn | |
(define-key org-mode-map "\M-1" (lambda () (interactive) (org-global-cycle 1))) | |
(define-key org-mode-map "\M-2" (lambda () (interactive) (org-global-cycle 2))) | |
(define-key org-mode-map "\M-3" (lambda () (interactive) (org-global-cycle 3))) | |
(define-key org-mode-map "\M-4" (lambda () (interactive) (org-global-cycle 4))) | |
(define-key org-mode-map "\M-5" (lambda () (interactive) (org-global-cycle 5))) | |
(define-key org-mode-map "\M-6" (lambda () (interactive) (org-global-cycle 6))) | |
(define-key org-mode-map "\M-7" (lambda () (interactive) (org-global-cycle 7))) | |
(define-key org-mode-map "\M-8" (lambda () (interactive) (org-global-cycle 8))) | |
(define-key org-mode-map "\M-9" (lambda () (interactive) (org-global-cycle 9))) | |
(define-key org-mode-map "\M-0" (lambda () (interactive) (show-all))) | |
(define-key orgstruct-mode-map "\M-1" (lambda () (interactive) (org-global-cycle 1))) | |
(define-key orgstruct-mode-map "\M-2" (lambda () (interactive) (org-global-cycle 2))) | |
(define-key orgstruct-mode-map "\M-3" (lambda () (interactive) (org-global-cycle 3))) | |
(define-key orgstruct-mode-map "\M-4" (lambda () (interactive) (org-global-cycle 4))) | |
(define-key orgstruct-mode-map "\M-5" (lambda () (interactive) (org-global-cycle 5))) | |
(define-key orgstruct-mode-map "\M-6" (lambda () (interactive) (org-global-cycle 6))) | |
(define-key orgstruct-mode-map "\M-7" (lambda () (interactive) (org-global-cycle 7))) | |
(define-key orgstruct-mode-map "\M-8" (lambda () (interactive) (org-global-cycle 8))) | |
(define-key orgstruct-mode-map "\M-9" (lambda () (interactive) (org-global-cycle 9))) | |
(define-key orgstruct-mode-map "\M-0" (lambda () (interactive) (show-all))) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment