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

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

Re: vterm and Meta?


From: Akib Azmain Turja
Subject: Re: vterm and Meta?
Date: Fri, 04 Aug 2023 00:49:15 +0600

hw <hw@adminart.net> writes:

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

VTerm doesn't usually flicker in most cases, but some heavy full-screen
problems (like Emacs) flickers on my machine.

However, my machine is 11 years old.  So maybe my machine isn't fast
enough.  ;)

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

Eat makes running Emacs inside Emacs (inside Emacs...) completely
effortless.  :D

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

Attachment: signature.asc
Description: PGP signature


reply via email to

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