Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

only two <ESC> hits will leave insert mode #113

Closed mpeschulz closed 11 years ago

mpeschulz commented 11 years ago

Hello there,

thank you for delimitMate, it works beautifully. However, leaving insert mode with a single does not work, a second will do it. After removing delimitMate, I get a similar behavior with key-binding like imap Z :call {something]

Any suggestions???

meh commented 11 years ago

Yeah, having the same issue here, apparently it does an imap <ESC>OC <Right> for some reason.

A temporary solution is to do a autocmd BufEnter * silent! iunmap <Esc>OC.

Actually, g:delimitMate_no_esc_mapping.

lcd047 commented 11 years ago

This is the wrong fix: it breaks handling of arrow keys in insert mode when Vim is running in xterms. Using arrow keys in insert mode is frowned uppon by some, but I believe this plugin is not the right place to police people's habits. :)

The right fix is to set g:delimitMate_no_esc_mapping to a true value in your .vimrc (as pointed out above), and update the docs.