blob: 5c6134a987acc75f1e0bcd1b1312337d50ea9e4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
#+TITLE: evil-org
[[https://melpa.org/#/evil-org][file:https://melpa.org/packages/evil-org-badge.svg]]
[[https://stable.melpa.org/#/evil-org][file:https://stable.melpa.org/packages/evil-org-badge.svg]]
Supplemental evil-mode key-bindings to Emacs org-mode.
This project is a continuation of
https://github.com/edwtjo/evil-org-mode/blob/master/evil-org.el by Edward Tjörnhammar.
From version 1.3 it was taken over by Somelauw.
See [[file:doc/changelog.org][changelog]] for a history of changes.
** Features
- normal, visual and insert mode bindings
- key bindings organised in key themes
- operators like > and < to work on headings
- text objects
- table support
** Keybindings
[[file:doc/keythemes.org][Full overview of bindings and configuration]]
*** Quick overview
|----------------+---------------------------|
| key | explanation |
|----------------+---------------------------|
| gh, gj, gk, gl | navigate between elements |
| vae | select an element |
|----------------+---------------------------|
**** Headings and items
|--------------+------------------------|
| key | explanation |
|--------------+------------------------|
| M-ret | insert heading |
| TAB | fold / unfold headings |
| M-h or << | promote a heading |
| M-l or >> | demote a heading |
| M-k | move subtree up |
| M-j | move subtree down |
| M-S-h or <aR | promote a subtree |
| M-S-l or >aR | demote a subtree |
| vaR | select a subtree |
|--------------+------------------------|
**** Tables
|-----------+--------------------------------|
| key | explanation |
|-----------+--------------------------------|
| ( | previous table cell |
| ) | next table cell |
| { | beginning of table |
| } | end of table |
| M-h / M-l | move table column left / right |
| M-k / M-j | move table column up / down |
| vae | select table cell |
| vaE | select table row |
| var | select whole table |
|-----------+--------------------------------|
** Requirements
- org-mode, git://orgmode.org/org-mode.git
- evil-mode, https://github.com/emacs-evil/evil
** Installation
*** Manual installation
#+BEGIN_SRC sh
mkdir -p ~/.emacs.d/plugins; git clone
git://github.com/somelauw/evil-org.git ~/.emacs.d/plugins/evil-org
#+END_SRC
**** Configuration emacs.el
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "~/.emacs.d/plugins/evil-org")
(require 'evil-org)
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(navigation insert textobjects additional))
#+END_SRC
Or you can customize =evil-org-key-theme= and replace the last line by:
#+BEGIN_SRC emacs-lisp
(evil-org-set-key-theme)
#+END_SRC
*** Installation by use-package
#+BEGIN_SRC emacs-lisp
(use-package evil-org
:ensure t
:after org
:config
(add-hook 'org-mode-hook 'evil-org-mode)
(add-hook 'evil-org-mode-hook
(lambda ()
(evil-org-set-key-theme))))
#+END_SRC
For a more elaborate setup, take a look at [[file:doc/example_config.el][this example]].
** Common issues
In case you run Emacs in a terminal, you might find that =TAB= does not work
as expected (being bound to =evil-jump-forward= instead of =org-tab=).
You can add this to your configuration to get =org-tab= instead at the cost
of losing =C-i= to jump.
#+BEGIN_SRC emacs-lisp
(setq evil-want-C-i-jump nil)
#+END_SRC
** See also
- [[https://github.com/edwtjo/evil-org-mode][evil-org-mode by edwtjo]]
Original org-mode plugin by edwtjo from which this project was forked
- [[https://github.com/GuiltyDolphin/org-evil][org-evil by GuiltyDolphin]]
Alternative integration of evil and org with different keybindings
- https://github.com/abo-abo/worf
Not an evil plugin, but provides vim-inspired key bindings
- https://github.com/jceb/vim-orgmode
Org mode plugin for vim
- http://orgmode.org/
The official org-mode website
- [[http://orgmode.org/orgcard.pdf]]
A handy cheat sheet, even if using this plugin
- https://github.com/Somelauw/evil-markdown
Similar project for markdown code
** License
Gnu General Public License v3.0, http://www.gnu.org/copyleft/gpl.html
|