Use case or problem
For Obsidian vim-keybinding users, it is by design that the Esc key is overloaded to do 2 things: exit vim insert mode and close any autocompletion popup: Bug when escaping from insert mode (vim) when inside a backlink - #2 by WhiteNoise
Seems to me that’s unnecessary friction for vim users: to exit insert mode, sometimes we hit Esc once, sometimes we hit Esc twice.
Proposed solution
Better to have a separate hotkey to only close the popup. In other words, let the Esc key both close the popup and propagate to the vim mode rather than give precedence to the popup. I would map that new hotkey to Shift+Esc (anything but Esc).
Related
This is similar to Add a setting to toggle whether <Esc> closes autocomplete in insert mode. · Issue #826 · VSCodeVim/Vim · GitHub . VS Code provides a hideSuggestWidget
command which is mapped to Shift+Esc
by default.
Alternate Solution
Actually, I would be happy even if there’s no customizable hotkey and Shift+Esc were simply built-in (as that is the default mapping in VS Code).
That might be even preferable to adding a custom hotkey. The reason is that I have Shift+Esc mapped in Completr and Various Complements to do the same thing (close the suggestions popup), and my impression is that if core has built-in hotkeys, then customized hotkeys take precedence and don’t conflict.