obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

Mapping <C-d>zz

Open bbawj opened this issue 1 year ago • 4 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 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.

bbawj avatar Sep 03 '22 12:09 bbawj

Hey try to use imap instead of noremap. It seems like noremap it's not supported by the plugin, but imap is.

RiccardoTonioloDev avatar Nov 19 '22 17:11 RiccardoTonioloDev

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 :)

bbawj avatar Nov 20 '22 04:11 bbawj

Yeah I've seen it, but a lot of people have problems while using it. That's why I suggested you to use imap.

RiccardoTonioloDev avatar Nov 23 '22 08:11 RiccardoTonioloDev