obsidian-vimrc-support
obsidian-vimrc-support copied to clipboard
Mapping <C-d>zz
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
I like to use <C-d>
and <C-u>
to navigate and wish to center the screen after centering with zz
.
I would like to ask if anyone managed to have any success mapping <C-d>
to <C-d>zz
My current mapping: noremap <C-d> <C-d>zz
This works in vim but seems to not be supported here.
Hey try to use imap
instead of noremap
. It seems like noremap
it's not supported by the plugin, but imap
is.
noremap
is supported:
See README:
The plugin skips blank lines and lines starting with Vimscript comments (" ...).
Special support for yanking to system clipboard can be activated by set clipboard=unnamed (unnamedplus will do the same thing).
Support for the tabstop Vim option (e.g. set tabstop=4).
Custom mapping/unmapping commands in addition to the defaults:
noremap
iunmap
nunmap
vunmap
PRs are welcome to implement more :)
Yeah I've seen it, but a lot of people have problems while using it. That's why I suggested you to use imap
.
I don't know if this is still an issue @bbawj but at least for me both bindings are working with the current versions of Obsidian and Vimrc Support
noremap <C-d> <C-d>zz
noremap <C-u> <C-u>zz