Wednesday, February 21, 2018

CTRL-[ == ALT == ESC to Vim? (or how to make them different)

That is what I get when typing with
<C-V> in insert mode.


(((

" C-V C-[
" C-V A-x
x

" C-V <ESC>
echo " " == " " == " "
echo ' ' == ' ' == ' '
)))
where this strange symbol appears as ^[ here,
and x seems to be any key.

In summary, C-[ and ESC equivalent, as somewhat
expected, and Alt is prepends an ESC to any key.
So, for example, if I make an insert-mode mapping

inoremap A-Y :echo 'a banana'

it will make the insert mode wait for a next letter after ESC (or C-[),
which I bypass with a command such as:
inoremap [ <ESC>:up<CR>
BTW. A-Y does not work here to write the imap,
I have to enter it by typing C-V A-Y.

BTW2. I hope these unusual chars don't mess your
emails as it is messing here (not writing it in Vim though..).

Is there a way to make ALT and ESC distinct?
(ok about ESC == CTRL-[).

Best,
rf

--
Renato Fabbri
GNU/Linux User #479299

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment