evil-org-mode
evil-org-mode copied to clipboard
Should we add [[ and ]] bindings
Problem
At the moment,
[[
mostly behaves like org-backward-element
]]
mostly behaves like org-forward-element
These bindings aren't perfect, because if ]]
is used on the penultimate element it jumps back instead.
For example
* main heading
** subheading1
** subheading2 (Pressing ]] here goes back to main heading instead of subheading3)
** subheading3
Solution
We can fix this by binding ]]
directly to org-forward-element
, but since we already have gj
and gk
for org-forward/backward-element
, it might also be an option to bind them to something else.
One idea is to bind [[
to org-previous-visible-heading
and ]]
to org-next-visible-heading
.
Question
What should [[
and ]]
be bound to?
Also, what to do with []
and ][
?
Here is an idea for these bindings:
"[[" 'org-backward-heading-same-level ; C-c C-b
"]]" 'org-forward-heading-same-level ; C-c C-f
"[m" 'org-previous-visible-heading ; C-c C-p
"]m" 'org-next-visible-heading ; C-c C-n
"[x" 'org-previous-link ; C-c C-x C-p
"]x" 'org-next-link ; C-c C-x C-n
"[v" 'org-babel-previous-src-block ; C-c C-v C-p
"]v" 'org-babel-next-src-block ; C-c C-v C-n
Would you include []
and ][
for navigating to just inside the header? (I.e. exclusive of the header)?