vim-orgmode icon indicating copy to clipboard operation
vim-orgmode copied to clipboard

keybindings for new subheadings

Open tpaixao opened this issue 8 years ago • 5 comments

Pressing <CR> on a heading produces a new heading at the same level, that's fine. But I would expect that pressing S-CR (or some variation of that) would produce a new subheading. Instead it also produces a new heading at the same level. Shouldn't this be the default behavior?

How do I remap these keys? The docs are not very clear on how to remap keys to specific functions (in part because there is no description of the available functions)

thanks for any help.

tpaixao avatar Jul 28 '15 09:07 tpaixao

As a workaround you can press ^T in insert mode to indent the created heading. A fitting hotkey would be of course the best solution.

seece avatar Aug 11 '15 08:08 seece

@seece that's the way to go. When a new heading is inserted orgmode takes you into insert mode then it's easy to change indentation with ^T or ^D. If you have a suggesting for a binding, I'll add it.

jceb avatar Aug 12 '15 05:08 jceb

Here's a set of keybindings that I think would suit vim-orgmode well: normal mode: CR new Heading (same level) below S-CR new subheading below C-CR new heading above C-S-CR new subheading above (if possible)

maybe the last one would be tricky to implement and potentially less useful.

is there any list of functions implemented in vim-orgmode? and is there a tutorial on how to assign keybindings to these functions?

thanks for all the comments

PS: I just realized that github did not display my hotkeys in vim style (I guess it interprets them as html tags - removed the enclosing brackets to make sure they display)

tpaixao avatar Aug 12 '15 10:08 tpaixao

Thanks for your suggestions. At least the <CR> mapping exists already. One issue with the other and also the current mappings is that they don't work in CLI vim. I guess combinations with <leader> and <mapleader> and other keys like c would be the way to go.

jceb avatar Mar 13 '16 08:03 jceb

Inserting new subheading is one of the most often things I do. Has something changed in the meantime, i.e. is there a keybinding for this now? If not, maybe one could go for <S-CR>, as it currently does the same as <CR>:

<S-CR>          - insert heading below, taking over children
<CR>            - insert heading below, taking over children

georgjaehnig avatar Jun 11 '16 14:06 georgjaehnig