When vim suggests completions, I can discard them without accepting with
I would like to remap that shortcut to
Escape while keeping the usual behavior of
Escape (exit insert mode) when no suggestion box is visible.
The answer provided here https://stackoverflow.com/a/50033076/13801624 lead me to try
inoremap <expr> <Esc> pumvisible() ? "<C-y>" : "<Esc>" however this just makes
Escape do nothing when a suggestion box is visible.