ryvnf / readline.vim

Readline emulation for command-line mode
88 stars 2 forks source link

Change behavior of escape #4

Closed ryvnf closed 5 years ago

ryvnf commented 5 years ago

After the feedback raised in issue #2 I have decided to change the default behavior of escape in the plugin. The old behavior is still available through the g:readine_esc option.

When g:readline_esc is set to zero (default) the <Esc>x mapping will only work if <Esc> and x is received simultaneously. This is the case when the user presses ALT-x. When <Esc> is pressed alone it will behave like default and exit the command-line. When the user presses an invalid mapping like <M-a> nothing happens.

When g:readline_esc is set to non-zero it will behave as before were <Esc> is mapped to <Nop>. This is to avoid closing the command-line by accident when pressing an invalid mapping like <M-a>.