Let Vim insert mode escape (esc) to normal mode even if suggestion dropdown open

I set the following as a startup Templater script, and it worked! Hope it helps :slight_smile:

<%*
const scope = app.workspace.editorSuggest.suggests[0].scope;
const key = scope.keys.find(key => key.key === 'Escape' && key.modifiers === '');
const oldFunc = key.func;
key.func = (...args) => void oldFunc(...args);
-%>

3 Likes