Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using worf is so much better #1417

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.")

28 changes: 21 additions & 7 deletions contrib/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,29 @@
org-present
org-repo-todo
toc-org
worf
))

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

(defun org/init-worf ()
(use-package worf
:if (eq org-mapping-style '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
:if (eq org-mapping-style '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 +131,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