Insert text as part of a keymap?
tjex opened this issue · 0 comments
Please make sure your question is within the scope of this plugin.
- [ x ] I know this plugin is about persisting changes to the Vim support built into Obsidian, plus some bonus features, and considered asking in the Obsidian forum first.
Describe the question
Has anyone been able to run a key command from insert or normal mode that writes text as part of its execution?
I cannot get any characters / text written from an imap
or nmap
.
eg:
imap <C-r> test
nmap <C-r> itest
imap <C-r> :echo test
<- this is how to do it in neovim, but it's not a valid command in Obsidian unfortunately.
I'm wanting to run a keycommand that does a bunch of things as well as type one symbol.
I have everything working except typing a character.
For sake of it, here is the key command so far: nmap <C-r> T[wyt|f|pA
It basically copies the text from behind itself, except the first character, and pastes it again.