t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 112 forks source link

vim-mode-plus prevents notifications from being dismissed #813

Open matthewwithanm opened 7 years ago

matthewwithanm commented 7 years ago

Atom notifications can't be dismissed using escape when vim-mode-plus is installed. To repro:

  1. Trigger a notification (atom.notifications.addError('hi'))
  2. With the editor focused, hit esc. (Nothing happens.)
  3. Trigger "Core: Cancel" from the command palette to see how it should work.
t9md commented 7 years ago

Yes, this is currently limitation of vim-mode-plus. In vim-mode-plus, escape is not mapped to core:cancel. It's mapped to vim-mode-plus:activate-normal-mode(not in normal-mode) or vim-mode-plus:reset-normal-mode. This is the implementation taken over from original vim-mode(github maintained), I can FIX this limitation by overloading core:cancel but postponed, since impact is big.

So currently what user can do is set dedicated keymap for core:cancel(what I'm doing now).

See this comment for detail.

https://github.com/t9md/atom-vim-mode-plus/issues/526#issuecomment-262701696

ghost commented 6 years ago

What is the function of reset-normal-mode? Does it need three keymaps?

https://github.com/t9md/atom-vim-mode-plus/blob/2e255afd8f8ea21ddf523d929807c1cf3f13102a/keymaps/vim-mode-plus.cson#L12-L17