Thursday, February 22, 2018

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

Em quarta-feira, 21 de fevereiro de 2018 19:07:14 UTC-3, ZyX escreveu:
> 2018-02-21 14:51 GMT+03:00 Renato Fabbri:
> > 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-[).
>
> You did not state what are you using exactly, this is essential to
> answer a question. If you are using Vim in a terminal emulator then
> you may need to ask *in terminal emulator's mailing list* first
> because Vim has no choice, but to swallow whatever terminal emulator
> throws at it. Ability to get help here in this case would depend on
> whether there are enough advanced users of your terminal emulator
> reading vim_use.

right. I am using a gnome-terminal (v3.18.3)
on an up-to-date Ubuntu 16.04.

I am usually inside byobu/tmux, but the issues remain the same,
inside or outside byobu, so it seem really to be somethig
to tackle in gnome-terminal (which AFAIR, is essentially a very
tweaked (or layer over) x-term).


>
> Note that normally terminal emulators have a setting allowing to use
> either `<Esc>` or the eighth bit for `<A-`, and AFAIR that sometimes
> is even possible to configure from Vim by making it output special
> escape codes recognized by terminal emulator. Other configuration
> variants are more rare. Note that eighth bit variant is not friendly
> to unicode.

Valuable notes, thanks.
I would like to configure it from Vim,
if any idea or info comes to mind,
please drop a line here.
I'll do the same.


>
> >
> > Best,
> > rf
> >
> > --
> > Renato Fabbri
> > GNU/Linux User #479299
> > labmacambira.sourceforge.net
> >
> > --
> > --
> > 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.

--
--
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