News for hackers. Stuff that matters.
Re:GNU Screen 5.0 Released by trallnag on Thursday August 29, 2024 @10:48AM (#41391360)
I wonder how many people are using the default b key binding in tmux
Re:GNU Screen 5.0 Released by entropie on Thursday August 29, 2024 @11:21AM (#41391738)
No emacs user.

I use p in screen and tmux as prefix key. I usually prefer tmux.

Re:GNU Screen 5.0 Released by sorrythanks on Thursday August 29, 2024 @11:34AM (#41391879)
Your use of p surprises me if you don't use b for emacs reasons! How do you go up a line!?
Re:GNU Screen 5.0 Released by entropie on Thursday August 29, 2024 @12:25PM (#41392509)
Iam pretty sure that was a recommendation in the emacswiki to use ^P instead of ^A as prefix key (that must be 15+ years ago). I think I didnt invest to much energy to think about an alternative. I almost never use ^P in my terminal emulator, but I use ^A all the time.

I usually never do heavy editing in a tmux window. Rarely I use emacs in a terminal window these days. I use tramp to remote connect and edit comfortably in my X session.

Re:GNU Screen 5.0 Released by setopt on Thursday August 29, 2024 @12:39PM (#41392676)
I dropped the prefix entirely: https://github.com/jabirali/tmux-tilish
Re:GNU Screen 5.0 Released by 331c8c71 on Thursday August 29, 2024 @12:44PM (#41392743)
I do.
Re:GNU Screen 5.0 Released by vindex10 on Thursday August 29, 2024 @01:29PM (#41393224)
I usually use ctrl+a locally but ctrl+b remotely, so they don't clash when nested.
Re:GNU Screen 5.0 Released by lanstin on Thursday August 29, 2024 @02:28PM (#41393867)
I use back-tick `. For nested, it becomes `` or ````. For twice nested and I'm writing a shell script with ` instead of $( .. ) It's ```````` (I'm an emacs user, I need all the control characters :)
Re:GNU Screen 5.0 Released by e-max on Thursday August 29, 2024 @06:50PM (#41396157)
I also use backticks, and in 99.9% of cases it works like a charm. But then one day you paste a large file, and the gates of hell open. Tmux randomly opens windows, kills sessions, and launches nuclear missiles while processing all the backticks in the text.
Re:GNU Screen 5.0 Released by setopt on Friday August 30, 2024 @02:45AM (#41398262)
I think this can be avoided if you enable “bracketed paste” in your terminal.
Re:GNU Screen 5.0 Released by lanstin on Friday August 30, 2024 @01:46PM (#41402938)
Yeah, that's true. Tho for large pastes, I generally only do that in a locally running GUI emacs. For remote, I'll assemble the file and then scp.

Even without tmux, this can be an issue - a long time ago I was using the X windows "drag the selection" middle mouse button action and accidentally let go of the button while the cursor was over an emacs text window - I sent my first email to some big listserv I subscribed to consisting of weird fragments from the log file I was trying to paste.a

Re:GNU Screen 5.0 Released by eikenberry on Thursday August 29, 2024 @02:55PM (#41394149)
I use the default ctrl-b for tmux and changed screen to use the same. I like it because on my keyboard, a Kinesis Advantage, the (left) ctrl and b keys are right next to each other which makes them an easy combo.
Re:GNU Screen 5.0 Released by susam on Thursday August 29, 2024 @06:45PM (#41396111)
> I wonder how many people are using the default b key binding in tmux

I do not use C-b as the tmux prefix key because it interferes with my muscle memory for Emacs where C-b invokes backward-char (i.e., move the cursor back by character(s)).

So I use C-j instead as the prefix key. While C-j also happens to be a useful Emacs key-binding, I use it quite rarely in Emacs. As a result, I do not have strong muscle memory for C-j and I can use it as the prefix key in tmux quite comfortably.

Here is my tiny .tmux.conf: https://github.com/susam/dotfiles/blob/main/.tmux.conf

Re:GNU Screen 5.0 Released by __david__ on Thursday August 29, 2024 @06:56PM (#41396207)
I use emacs so that meant practically every prefix character would annoy me at some point. I ended up using C-\ since that almost never gets used by anything (I was surprised it could even be detected by terminals).
Re:GNU Screen 5.0 Released by setopt on Friday August 30, 2024 @02:51AM (#41398283)
C-\ is one of my favorite Emacs keybindings :). You use it to change input methods, in my case to write e.g. Greek letters and other Unicode symbols in plaintext files using TeX notation.

I sometimes like to program using Unicode variable names when doing physics/math, and this is an easy way to do so built into Emacs.