diff options
| author | Edward Tjörnhammar <ed@cflags.cc> | 2013-08-12 05:32:59 -0700 |
|---|---|---|
| committer | Edward Tjörnhammar <ed@cflags.cc> | 2013-08-12 05:32:59 -0700 |
| commit | ab5683b4b416ffa8f41748a7c368922a0159325c (patch) | |
| tree | d1608f9f2b73408cd9ccf45e684887681c6dd25b | |
| parent | 4223e090f26da3fedcd3dee1853b58a8e4e496f0 (diff) | |
| parent | e63c2c1bebb2869b301f88e9eb6304128925dee4 (diff) | |
Merge pull request #4 from AdrieanKhisbe/master
READE in org format and function documentation
Backwards compatible bindings
| -rw-r--r-- | README.md | 27 | ||||
| -rw-r--r-- | README.org | 60 | ||||
| -rw-r--r-- | evil-org.el | 10 |
3 files changed, 68 insertions, 29 deletions
diff --git a/README.md b/README.md deleted file mode 100644 index 9be3d15..0000000 --- a/README.md +++ /dev/null @@ -1,27 +0,0 @@ -evil-org-mode -============= - -Supplemental evil-mode key-bindings to Emacs org-mode. This is a work in progress, expect improvements and don't be afraid to contribute patches. - -Requirements -============ - -* org-mode, git://repo.or.cz/org-mode.git -* evil-mode, git://gitorious.org/evil/evil.git -* evil-leader, git://github.com/cofi/evil-leader.git - -Installation -============ - - mkdir -p ~/.emacs.d/plugins; git clone git://github.com/edwtjo/evil-org-mode.git ~/.emacs.d/plugins/evil-org-mode - -emacs.el --------- - - (add-to-list 'load-path "~/.emacs.d/plugins/evil-org-mode") - (require 'evil-org) - -License -======= - -Gnu General Public License v3.0, http://www.gnu.org/copyleft/gpl.html diff --git a/README.org b/README.org new file mode 100644 index 0000000..6e05a10 --- /dev/null +++ b/README.org @@ -0,0 +1,60 @@ +#+TITLE: evil-org-mode + +# What will be evil org without an org Readme? + +Supplemental evil-mode key-bindings to Emacs org-mode. This is a work in progress, expect improvements and don't be afraid to contribute patches. + +* Requirements + +- org-mode, git://repo.or.cz/org-mode.git +- evil-mode, git://gitorious.org/evil/evil.git +- evil-leader, git://github.com/cofi/evil-leader.git + +* Installation + +#+BEGIN_SRC sh + mkdir -p ~/.emacs.d/plugins; git clone git://github.com/edwtjo/evil-org-mode.git ~/.emacs.d/plugins/evil-org-mode +#+END_SRC + +** emacs.el + +#+begin_src emacs-lisp + (add-to-list 'load-path "~/.emacs.d/plugins/evil-org-mode") + (require 'evil-org) +#+end_src + +* Keys +Here are the keys introduced by evil-org + + | gh | outline-up-heading | + | gj | org-forward-heading-same-level | + | gk | org-backward-heading-same-level | + | gl | outline-next-visible-heading | + | t | org-todo | + | T | org-insert-todo-heading nil | + | H | org-beginning-of-line | + | L | org-end-of-line | + | ;t | org-show-todo-tree | + | o | always-insert-item | + | O | org-insert-heading | + | '$' | org-end-of-line | + | '^' | org-beginning-of-line | + | < | org-metaleft | + | > | org-metaright | + | ;a | org-agenda | + |-----+--------------------------------------------| + | TAB | org-cycle | + | M-l | org-metaright | + | M-h | org-metaleft | + | M-k | org-metaup | + | M-j | org-metadown | + | M-L | org-shiftmetaright | + | M-H | org-shiftmetaleft | + | M-K | org-shiftmetaup | + | M-J | org-shiftmetadown | + | M-o | org-insert-heading+org-metaright | + | M-t | org-insert-todo-heading nil+ org-metaright | + +* License + +Gnu General Public License v3.0, http://www.gnu.org/copyleft/gpl.html diff --git a/evil-org.el b/evil-org.el index b306cff..941d14d 100644 --- a/evil-org.el +++ b/evil-org.el @@ -40,12 +40,14 @@ (add-hook 'org-mode-hook 'evil-org-mode) ;; only load with org-mode (defun always-insert-item () + "Force insertion of org item" (if (not (org-in-item-p)) (insert "\n- ") (org-insert-item)) ) (defun evil-org-eol-call (fun) + "Go to end of line and call provided function" (end-of-line) (funcall fun) (evil-append nil) @@ -54,8 +56,12 @@ ;; normal state shortcuts (evil-define-key 'normal evil-org-mode-map "gh" 'outline-up-heading - "gj" 'org-forward-same-level - "gk" 'org-backward-same-level + "gj" (if (fboundp 'org-forward-same-level) ;to be backward compatible with older org version + 'org-forward-same-level + 'org-forward-heading-same-level) + "gk" (if (fboundp 'org-backward-same-level) + 'org-backward-same-level + 'org-backward-heading-same-level) "gl" 'outline-next-visible-heading "t" 'org-todo "T" '(lambda () (interactive) (evil-org-eol-call '(org-insert-todo-heading nil))) |
