Skip to content

Commit

Permalink
Give a prefix and bindings for org applications
Browse files Browse the repository at this point in the history
Related to syl20bnr#1296.

Use `SPC a o` as prefix for org related applications like `org-agenda`
or `org-capture`. The `a` is for "application", and `o` for "org". To
avoid long keystrokes for `agenda`, direct bindings are offered through
`SPC a o <key>`.

Because `org-agenda` is one of the principal application, it has be
mapped to repeating the last letter (`SPC a o o`).

(cherry picked from commit 2b5b2d3)
  • Loading branch information
StreakyCobra authored and zv committed Dec 23, 2015
1 parent 62acdc4 commit 37fcc28
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
28 changes: 22 additions & 6 deletions layers/org/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [[#different-bullets][Different bullets]]
- [[#key-bindings][Key bindings]]
- [[#org][Org]]
- [[#org-with-evil-org-mode][Org with evil-org-mode]]
- [[#tables][Tables]]
- [[#tree-][Tree ]]
- [[#element-insertion][Element insertion]]
Expand Down Expand Up @@ -75,6 +76,24 @@ You can tweak the bullets displayed in the org buffer in the function

* Key bindings
** Org
| Key Binding | Description |
|-------------+--------------------------------|
| ~SPC a o #~ | org agenda list stuck projects |
| ~SPC a o /~ | org occur in agenda files |
| ~SPC a o a~ | org agenda list |
| ~SPC a o c~ | org capture |
| ~SPC a o e~ | org store agenda views |
| ~SPC a o l~ | org store link |
| ~SPC a o m~ | org tags view |
| ~SPC a o o~ | org agenda |
| ~SPC a o O~ | org clock out |
| ~SPC a o s~ | org search view |
| ~SPC a o t~ | org todo list |
| ~SPC C c~ | org-capture |
| ~SPC C t~ | ort/capture-todo |
| ~SPC C T~ | ort/capture-checkitem |

** Org with evil-org-mode
| Key Binding | Description |
|----------------------------------------------+----------------------------------------------|
| ~SPC m '~ | org-edit-special |
Expand Down Expand Up @@ -221,12 +240,9 @@ org-present must be activated explicitly by typing: ~SPC : org-present~
| ~q~ | quit |

** Org-repo-todo
| Key Binding | Description |
|-------------+-----------------------|
| ~SPC C c~ | org-capture |
| ~SPC C t~ | ort/capture-todo |
| ~SPC C T~ | ort/capture-checkitem |
| ~SPC m g t~ | ort/goto-todos |
| Key Binding | Description |
|-------------+----------------|
| ~SPC m g t~ | ort/goto-todos |

** Org-MIME
| Key Binding | Description |
Expand Down
20 changes: 19 additions & 1 deletion layers/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
(defun org/init-org ()
(use-package org
:mode ("\\.org$" . org-mode)
:commands (org-clock-out org-occur-in-agenda-files)
:defer t
:init
(progn
Expand Down Expand Up @@ -196,7 +197,24 @@ Will work on both org-mode and any mode that accepts plain html."
(define-key org-agenda-mode-map
(kbd "RET") 'org-agenda-show-and-scroll-up)
(define-key org-agenda-mode-map
(kbd "SPC") evil-leader--default-map)))
(kbd "SPC") evil-leader--default-map))

;; Add global evil-leader mappings. Used to access org-agenda
;; functionalities – and a few others commands – from any other mode.
(evil-leader/set-key
;; org-agenda
"ao#" 'org-agenda-list-stuck-projects
"ao/" 'org-occur-in-agenda-files
"aoa" 'org-agenda-list
"aoe" 'org-store-agenda-views
"aom" 'org-tags-view
"aoo" 'org-agenda
"aos" 'org-search-view
"aot" 'org-todo-list
;; other
"aoO" 'org-clock-out
"aoc" 'org-capture
"aol" 'org-store-link))
:config
(progn
;; setup org directory
Expand Down

0 comments on commit 37fcc28

Please sign in to comment.