Closed romariorobby closed 3 years ago
You can do something like this:
imap <TAB> <C-o>>>
<C-o>
leaves insert mode for single normal mode command
>>
does the demote
Adding insert mode specific mappings is tricky because it doesn't allow changing content programatically that easily, so I don't plan to add any support for those. I'll probably just add handling the Enter to properly continue list item/checkbox (related comment https://github.com/kristijanhusak/orgmode.nvim/issues/57#issuecomment-887980098) at some point, since pressing <leader><CR>
to achieve that is a bit obnoxious.
Yes, that how i solved this too with recursive mapping. Thank you!
Hi, I'm trying to achieve the same behavior with the meta_return mapping, at the end of my lua/after/org.lua file I have:
vim.keymap.set('i', '<Space><CR>', '<C-o><leader><CR>')
but it does not work as keymap despite the {rhs} working as expected if typed manually.
I tried also this mapping:
vim.keymap.set('i', '<<Tab>', '<C-o><leader>oi.')
but I only get oi.
inserted in my buffer.
Could anyone guide me on applying such keymaps? Thanks.
Does this feature exist in Emacs orgmode core?
N/A
Orgmode link
No response
Feature value
No response
Additional context
Is there a way to bind in insert mode? I'd like to bind
do_demote
withTAB
anddo_promote
S-TAB
. I know in documentation says only works in normal mode.