summaryrefslogtreecommitdiff
path: root/doc/keythemes.org
blob: a2d2ea3fa09f041316c56a38fe1261a656cb9dc5 (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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
* Key themes
  
  The config is set up in key themes.

  To enable all bindings use:

  #+begin_src emacs-lisp
  (evil-org-set-key-theme '(textobjects insert navigation additional shift todo heading))
  #+end_src

** Basic
   These keys are always enabled
   
   |-------+-------------------------------+--------------------------------------------|
   | key   | function                      | explanation                                |
   |-------+-------------------------------+--------------------------------------------|
   | =TAB= | org-cycle                     | change folding level of current heading    |
   | =0=   | evil-org-beginning-of-line    | like 0 but can be special*                 |
   | =$=   | evil-org-end-of-line          | like $ but can be special*                 |
   | =I=   | evil-org-insert-line          | like I but can be special*                 |
   | =A=   | evil-org-append-line          | like A but can be special*                 |
   | =o=   | evil-org-open-below           | like o but continue tables and items*      |
   | =O=   | evil-org-open-above           | like O but continue tables and items*      |
   | =d=   | evil-org-delete               | like d but keep tags aligned and fix lists |
   | =x=   | evil-org-delete-char          | like x but keep tables and tags aligned    |
   | =X=   | evil-org-delete-previous-char | like X but keep tables and tags aligned    |
   | =(=   | org-forward-sentence          | next cell in table                         |
   | =)=   | org-backward-sentence         | previous cell in table                     |
   | ={=   | org-backward-paragraph        | beginning of table                         |
   | =}=   | org-forward-paragraph         | end of table                               |
   |-------+-------------------------------+--------------------------------------------|

   * Set =org-special-ctrl-a/e= to =t= to make =org-beginning-of-line= and =org-end-of-line= ignore leading stars or tags on headings. Repeat to toggle. By default it's set to ~nil~.
   * =evil-org-insert-line= and =evil-org-append-line= also respect the setting of =org-special-ctrl-a/e=.
   * The cases in which =o= and =O= should behave special can be controlled using =evil-org-special-o/O=. By default it's set to ~'(table-row item)~.

*** Operators
    Context dependent dwim operators for:
    - promoting/demoting on headings and items
    - moving table columns
    - changing indent in other contexts (when editing source code)

    |-----+------------+-------------------------------------|
    | key | function   | explanation                         |
    |-----+------------+-------------------------------------|
    | =<= | evil-org-< | Promote all headings in marked area |
    | =>= | evil-org-< | Demote all headings in marked area  |
    |-----+------------+-------------------------------------|
    
    Variable =evil-org-retain-visual-state-on-shift= controls whether the selection should be restored after promoting / indenting, which is helpful if you want to promote / indent multiple times. By default this variable is set to =nil=.

    Examples:
    - =>>= to promote a heading
    - =>ar= to promote a tree
    - =<(= to swap a table column with the one on the left
    - =vie2>= to move a table column two places to the right

    If you want =<= and =>= to promote / demote headings and items on a single press, add the following to your org setup:

    #+begin_src emacs-lisp
    (evil-define-key 'normal evil-org-mode-map
                     (kbd ">") 'org-meta-right
                     (kbd "<") 'org-meta-left)
    #+end_src
    Or enable the additional key binding theme and use =M-h= and =M-l.=

** Navigation
   If you don't want to use =h/j/k/l,= you can customize =evil-org-movement-bindings=.

   |------+----------------------+-------------------|
   | key  | function             | explanation       |
   |------+----------------------+-------------------|
   | =gh= | org-element-up       | parent of element |
   | =gj= | org-forward-element  | next element      |
   | =gk= | org-backward-element | previous element  |
   | =gl= | org-down-element     | first subelement  |
   | =gH= | evil-org-top         | top-level heading |
   |------+----------------------+-------------------|

** Text objects
   
   |-------------+-----------------------------------+----------------------------------|
   | key         | function                          | examples                         |
   |-------------+-----------------------------------+----------------------------------|
   | =ae= / =ie= | evil-org-an/inner-object          | link, markup, table cell         |
   | =aE= / =iE= | evil-org-an/inner-element         | paragraph, code block, table row |
   | =ar= / =ir= | evil-org-an/inner-greater-element | item list, table                 |
   | =aR= / =iR= | evil-org-an/inner-subtree         | subtree starting with a header   |
   |-------------+-----------------------------------+----------------------------------|
  
  - =ae/ie= select the smallest object or element at point. Can be repeated to select adjacent objects / elements.
  - =aE/iE= select the smallest element at point. Elements build up the structure of the document, so there is always an element at any point. Can be repeated to select adjacent elements.
  - =ar/ir= select smallest element that is a container of other elements. Can be repeated to select greater elements
    
  Examples:
   - =vae= to select a paragraph
   - =daR= to delete a subtree
   - =yiR= to yank the contents of a subtree

** Additional
   If you don't want to use hjkl, you can customize =evil-org-movement-bindings=.
   If you want to use these bindings even in insert mode, you can customize =evil-org-use-additional-insert=.

   |-------+--------------------+-------------------+-------------------|
   | key   | function           | On headings       | On tables         |
   |-------+--------------------+-------------------+-------------------|
   | =M-h= | org-metaleft       | promote heading   | move column left  |
   | =M-l= | org-metaright      | demote heading    | move column right |
   | =M-k= | org-metaup         | move subtree up   | move column up    |
   | =M-j= | org-metadown       | move subtree down | move column down  |
   | =M-H= | org-shiftmetaleft  | promote subtree   | delete column     |
   | =M-L= | org-shiftmetaright | demote subtree    | insert column     |
   | =M-K= | org-shiftmetaup    | move heading up   | delete row        |
   | =M-J= | org-shiftmetadown  | move heading down | insert row        |
   |-------+--------------------+-------------------+-------------------|

** Shift
   Disabled by default.
   If you don't want to use hjkl, you can customize =evil-org-movement-bindings=.

   |-----+----------------+--------------------|
   | key | function       | explanation        |
   |-----+----------------+--------------------|
   | =H= | org-shiftleft  | previous todo item |
   | =L= | org-shiftright | next todo item     |
   | =J= | org-shiftdown  | decrease priority  |
   | =K= | org-shiftup    | increase priority  |
   |-----+----------------+--------------------|

** Todo
   Disabled by default.

   |-------+----------------------------|
   | key   | function                   |
   |-------+----------------------------|
   | =t=   | org-todo                   |
   | =T=   | org-insert-todo-heading    |
   | =M-t= | org-insert-todo-subheading |
   |-------+----------------------------|
  
** Heading
   Disabled by default.

   |-------+-----------------------|
   | key   | function              |
   |-------+-----------------------|
   | =O=   | org-insert-heading    |
   | =M-o= | org-insert-subheading |
   |-------+-----------------------|

** Commands without default binding
   These functions don't have any bindings by default and aren't well-maintained. You can bind them under =C-c= or another leader key.

   |----------------------------------------+----------------------------------------|
   | function                               | explanation                            |
   |----------------------------------------+----------------------------------------|
   | evil-org-open-links                    | opens links in selection               |
   | evil-org-open-incognito                | open link at point in incognito window |
   |----------------------------------------+----------------------------------------|

   =evil-org-open-links= opens all links in a selection. Use =RET= to open a single link.
   =evil-org-open-incognito= tries to open a link in a private window.