obsidian-vimrc-support
obsidian-vimrc-support copied to clipboard
How to chain obcommands and/or vim commands
When chaining vim commands, I would do something like:
nmap T dawbP
I'd like to chain vim commands with obcomminds, something like the following:
exmap insert_time obcommand insert-current-time
nmap <A-;> :insert_time :insert_time
" or
nmap <A-;> I##<esc> :insert_time
This doesn't work however. Is there a way to do so?
The CodeMirror Vim module doesn't support it :( But I'll add it as a feature request to make a "command chaining" Ex command.
As a workaround, the Commander plugin can be used to create macros, and those can then be bound to vim commands after you figure out what they are from the hotkeys.json
by assigning something temporarily:
exmap linktab obcommand cmdr:macro-0
nmap gd :linktab
@esm7 CodeMirror now supports chaining commands and motions after commands. Are there any plans to update the plugin to use a newer version of CM6?
https://github.com/replit/codemirror-vim/issues/148