Live data from Hacker News

Tmux Tutorial

leimao.github.io

61–70 of 166 posts

Re: Tmux Tutorial

#61
post #40

Cool, a coworker showed me tmux yesterday. One question we had was about scrolling in the tmux window and keeping the terminal output (as in Linux where I can scroll back with Shift+PageUp). Does anybody knows how that works with tmux?

You can enter scroll mode with ctrl+b+[ then you can mouse wheel, PageUp, etc. To exit just press q or ctrl+c

ctrl+b, pageup is enough to start scroll back so you can skip [

Re: Tmux Tutorial

#62
One of the biggest improvements in my tmux productivity came when I changed my prefix (default Ctrl + b) to backtick (i.e. to `) I am a heavy user of tmux and spend a lot of time switching panes, switching windows, entering visual mode, detatching etc. so this really feels faster.

    # change prefix to backtick
    unbind-key C-b
    set-option -g prefix `
    bind-key   ` send-prefix

Re: Tmux Tutorial

#63
post #57

Earlier quoted context omitted.

There is no consensus on the best prefix so there is no point in changing it after 10 years. Lots of people dislike C-a.

I can imagine, what is best will likely depend on preference. But at least the defaults should be sensible.

There is no agreement on what is sensible and what is not, the defaults are no more or less sensible than any other suggestion.

Re: Tmux Tutorial

#64
post #57

Earlier quoted context omitted.

I can imagine, what is best will likely depend on preference. But at least the defaults should be sensible.

There is no agreement on what is sensible and what is not, the defaults are no more or less sensible than any other suggestion.

Oh, yes there are.

C-b is terrible for your wrist, especially in conjunction with the following commands.

Choosing C-a isn't as much about preference as it is about not-terrible ergonomics. Now people are right to prefer anything other than C-a or C-b but C-a is objectively a much saner default than C-b.

Re: Tmux Tutorial

#65
post #62

One of the biggest improvements in my tmux productivity came when I changed my prefix (default Ctrl + b) to backtick (i.e. to `) I am a heavy user of tmux and spend a lot of time switching panes, switching windows, entering visual mode, detatching etc. so this really feels faster. # change prefix to backtick unbind-key C-b set-option -g prefix ` bind-key ` send-prefix

I might be missing something but how do you input character ` as is (in vim inside tmux for example) if it's bound to prefix?

Re: Tmux Tutorial

#66

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

Absolutely! TMux is pretty great by itself, but it doing its own internal scrolling and copy-pasting, though essential, is a usability frustration.

Tmux + iTerm2 is a fantastic combo that takes all of Tmux's pwer and removes all the downsides.

I searched if anything else used Tmux's Control Channel on Linux to replicate iTerm2's features, and I'm sad that I found nothing.

(Frankly, it's kind of stunning to me that one terminal app on macOS has more useful features than the plethora of me-too terminals on Linux)

Re: Tmux Tutorial

#67

If you're on a Mac, try tmux -CC with iTerm2. You get tmux goodness like multiple panes, persistent sessions, etc. But you also get native scrolling, native copy and paste, etc. It's what makes tmux usable for me.

tmux -CC really is great on mac, but if it worked with mosh it would be incredible.

The featuresets of Tmux and mosh conflict directly.

Unfortunately.

Re: Tmux Tutorial

#68
post #58
post #25

Earlier quoted context omitted.

You could remapped whatever you don’t link. I have Caps Lock set to be Ctrl and tmux set to use Ctrl+a. For a vertical split, I have it mapped to Ctrl+a, |. For horizontal, Ctrl+a, - It’s pretty flexible.

Not sure why ctrl-a and ctrl-b are such popular prefixes, I use both a lot editing readline.

Exactly! Have you found any decent replacement?

Re: Tmux Tutorial

#69
post #64

Earlier quoted context omitted.

There is no agreement on what is sensible and what is not, the defaults are no more or less sensible than any other suggestion.

Oh, yes there are. C-b is terrible for your wrist, especially in conjunction with the following commands. Choosing C-a isn't as much about preference as it is about not-terrible ergonomics. Now people are right to prefer anything other than C-a or C-b but C-a is objectively a much saner default than C-b.

Absolute nonsense, are you trying to press C-b with one hand?
Post reply on HN