Closed oniatsu closed 4 years ago
You can set falsy value to the keystrokes which you wish to unbind in your keymap.cson
like so:
".CodeMirror.vim-mode.normal-mode textarea":
"s h": false
"s k": false
Thanks! But the problem is not solved.
For example, I set some preferences on keyconfig.cson
to make every keystrokes starting with s
invalid.
".CodeMirror.vim-mode.normal-mode textarea":
"s h": false
"s k": false
".sidebar-menu":
"s l": false
".sidebar-book-filter-menu":
"s l": false
".note-list-bar":
"s l": false
"s h": false
".mde-preview":
"s h": false
"s k": false
I typed s h
on a main textarea on vim normal mode, then nothing happened.
An expected action is replacing a string at cursor to h
, because s
means substitution action.
Probably, that is because the s h
keybind is still valid.
Will reply next week
On Fri, Jun 19, 2020 at 19:48 oniatsu notifications@github.com wrote:
Thanks! But the problem is not solved.
For example, I set some preferences on keyconfig.cson to make every keystrokes starting with s invalid.
".CodeMirror.vim-mode.normal-mode textarea": "s h": false "s k": false".sidebar-menu": "s l": false".sidebar-book-filter-menu": "s l": false".note-list-bar": "s l": false "s h": false".mde-preview": "s h": false "s k": false
I typed s h on a main textarea on vim normal mode, then nothing happend. An expected action is replacing a string at cursor to h, because s means substitution action.
Probably, that is why the s h keybind is still valid.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/inkdropapp/inkdrop-vim/issues/19#issuecomment-646569453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKFMRLSKBLE37T3C2TJDPTRXM657ANCNFSM4OBO35BA .
That makes sense.
So s h
is bound as 'do nothing' and not actually canceling the keybinding.
Well, since those keybindings mess the existing default vim behavior, I will remove them.
Landed in v2.1.2🎉
That works well! Thank you.
Is there any way of unmapping dafault keybinds?
I want to fix confliction of default keybinds.
For example, a substitution command
s
works so late, because there are some 2 stroke keybinds starting froms
. https://github.com/inkdropapp/inkdrop-vim/blob/master/keymaps/vim.json#L130 https://github.com/inkdropapp/inkdrop-vim/blob/master/keymaps/vim.json#L5-L6The delay makes
s
command unuseful.If a developping the unmapping way is difficult, I think these
s x
keybinds should be removed from default. https://github.com/inkdropapp/inkdrop-vim/blob/master/keymaps/vim.json#L5-L6