help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vterm and Meta?


From: hw
Subject: Re: vterm and Meta?
Date: Thu, 03 Aug 2023 16:15:44 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

On Wed, 2023-08-02 at 15:02 +0600, Akib Azmain Turja wrote:
> hw <hw@adminart.net> writes:
> 
> > On Wed, 2023-08-02 at 01:01 +0600, Akib Azmain Turja wrote:
> > > hw <hw@adminart.net> writes:
> > > 
> > > > Hi,
> > > > 
> > > > I'm trying out vterm and it turns out that I can't use the ESC key
> > > > when within a vterm buffer: i. e. I don't have the meta key anymore
> > > > because that gets sent to the terminal rather than emacs.
> > > > 
> > > > According to [1], I could maybe remove the ESC key from vterm-mode-map
> > > > --- but it seems desirable to be able to use the ESC key for programs
> > > > that might run in vterm.
> > > > 
> > > > How do you deal with this?  Do you use another key for the meta key
> > > > other programs are less likely to make use of than the ESC key?
> > > > 
> > > > 
> > > > [1]: https://github.com/akermu/emacs-libvterm#shell-side-configuration
> > > > 
> > > > 
> > > 
> > > I use Eat BTW.
> > 
> > Eat?  Is that another terminal for emacs?
> 
> Yes.  https://codeberg.org/akib/emacs-eat  :D
> Disclaimer:  I'm the author.  ;)

Cool, it looks interesting :)

I haven't seen vterm flicker, though.  Perhaps it's because I'm
running emacs on wayland?

> > > Eat doesn't bind 'ESC', instead it binds 'ESC ESC' to
> > > send ESC.  This allows me to send meta-keys.  When I need to send ESC, I
> > > just press ESC twice.
> > 
> > So do you also need to use ESC as Meta key?
> 
> I usually use Alt as Meta key, but I can also use ESC as the meta
> (though I hardly do that, Alt is easier for me).

Yes, Alt is much easier.  It never worked before, though.

> > > I believe this can be done in Vterm too.
> > 
> > Perhaps it can ...  It would be easier if I could use Alt instead of
> > ESC for Meta.  How could I do that?
> 
> VTerm is a nice terminal emulator, but it's key bindings are kinda
> messed up IMHO.  You need to fix it yourself.  It isn't tough, but I
> forgot exactly how to do it.

Hm, I've found that I can't use emacs on a remote machine when
connecting via ssh in vterm to a tmux session on that machine because
the local emacs intercepts the key presses and it uses them for itself
before they make it to the remote emacs.

I'm not sure what to do about that yet ...  Mabe eat is the way to go?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]