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

Should we add [[ and ]] bindings #13

Open
Somelauw opened this issue Jul 30, 2017 · 2 comments
Open

Should we add [[ and ]] bindings #13

Somelauw opened this issue Jul 30, 2017 · 2 comments

Comments

@Somelauw
Copy link
Owner

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 ][?

@Somelauw
Copy link
Owner Author

Somelauw commented Nov 4, 2017

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

@BlueDrink9
Copy link

Would you include [] and ][ for navigating to just inside the header? (I.e. exclusive of the header)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants