Skip to content

Commit

Permalink
Add variable to chose org-mapping-style
Browse files Browse the repository at this point in the history
Can be 'worg, 'evil-org or nil
  • Loading branch information
CestDiego committed Aug 26, 2015
1 parent 3483918 commit a40b242
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
5 changes: 5 additions & 0 deletions contrib/org/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@

(defvar org-enable-github-support nil
"If non-nil Github related packages are configured.")

(defvar org-mapping-style nil
"Defines org editting style.
Can be 'worf or 'evil-org but defaults to none.")

25 changes: 18 additions & 7 deletions contrib/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@
toc-org
))

(when org-mapping-style
(push org-mapping-style org-packages))

(defun org/init-worf ()
(use-package worf
:commands worf-mode
:init
(add-hook 'org-mode-hook 'worf-mode)
:config
(spacemacs|diminish worf-mode "" " e")))

(defun org/init-evil-org ()
(use-package evil-org
:commands evil-org-mode
:init
(add-hook 'org-mode-hook 'evil-org-mode)
:config
(progn
(evil-leader/set-key-for-mode 'org-mode
"a" nil "ma" 'org-agenda
"b" nil "mb" 'org-tree-to-indirect-buffer
"c" nil "mA" 'org-archive-subtree
"o" nil "mC" 'evil-org-recompute-clocks
"l" nil "mo" 'evil-org-open-links
"t" nil "mT" 'org-show-todo-tree)
(evil-define-key 'normal evil-org-mode-map
"O" 'evil-open-above)
(spacemacs|diminish evil-org-mode "" " e"))))
Expand Down Expand Up @@ -124,6 +128,13 @@ Will work on both org-mode and any mode that accepts plain html."
(kbd "SPC") evil-leader--default-map))))
:config
(progn
(evil-leader/set-key-for-mode 'org-mode
"ma" 'org-agenda
"mb" 'org-tree-to-indirect-buffer
"mA" 'org-archive-subtree
"mC" 'evil-org-recompute-clocks
"mo" 'org-open-at-point
"mT" 'org-show-todo-tree)
(font-lock-add-keywords
'org-mode '(("\\(@@html:<kbd>@@\\) \\(.*\\) \\(@@html:</kbd>@@\\)"
(1 font-lock-comment-face prepend)
Expand Down

0 comments on commit a40b242

Please sign in to comment.