Live data from Hacker News

Using tmux properly

danielallendeutsch.com

31–40 of 218 posts

Re: Using tmux properly

#31

The big problem I always have with tmux is that is messes up all of the colors in my Vim.

Try aliasing tmux to 'TERM=screen-256color tmux -2', I made my vim colors work. Just in case, excerpt from my vimrc :

  set background=dark
  set t_Co=16
  let g:solarized_termcolors=16
  colorscheme solarized

Re: Using tmux properly

#32
Does mouse copy and paste work correctly with tmux? I find that it selects spans across multiple panes. Is there a way to fix this or Windows or Linux?

Re: Using tmux properly

#33
Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, for vim it has definitely been in my experience.

Re: Using tmux properly

#34
It still sounds like a very shallow (naive?) use of tmux to me, I'm in no way a real power user of tmux and I use a lot more feature than that.

You could talk about binds without prefix, sessions, customized status bar, pane swapping, bind keys to script launching, plugins, pane highlighting...

And the best feature of all for me: maximized pane toggle. I use that ALL the time.

I never could find all features I needed from an emulator (plus, I want a drop-down terminal), Tmux have them all and more and I'm not dependent of a specific emulator.

Re: Using tmux properly

#35
post #20

Earlier quoted context omitted.

I can SSH to a machine and connect to a tmux session. Tmux's competition is not terminator, but screen.

screen + dvtm, as I hear tmux has sensible way to manage split windows, while screen's way is atrocious.

Hm, true.

Re: Using tmux properly

#36
post #32

Does mouse copy and paste work correctly with tmux? I find that it selects spans across multiple panes. Is there a way to fix this or Windows or Linux?

I use the "PREFIX z" command to "maximize" the current pane, that is, it hides all the other panes and makes the current one the only visible pane, filling the whole terminal. Then I copy, and "PREFIX z" again to go back.

Re: Using tmux properly

#37
post #33

Yesterday I was helping a friend setting a box with no graphical session: I fired up tmux in the linux virtual terminal and then proceeded to realize without my tmux.conf I couldn't do a thing because I have always been using entirely different keybindings from the default. This is the problem with too much customization. Learning to use the default configuration may be difficult but it's probably worth the effort, f…

I agree a lot with this, for two reasons: the one you gave, and the fact that customizing too much your tools makes them unusable by anyone else. I don't know about you, but at my work we're often working on someone else computer (debugging, pair programming...). Always keep the default config available!

Re: Using tmux properly

#38
post #27
post #25

Earlier quoted context omitted.

Sessions are the killer feature for me. I have a session for each project I work on and can have all my tabs, panes, vim, etc set up and switch between them at any time. Sessions can be persisted so that even if I reboot my machine all my project workspace configurations are saved and ready to go.

How do you persist sessions between reboots?

The session doesn't actually persist between boots. I think what the parent must be referring to is the ability to create tmux session configurations. Then after a reboot if you try to connect to the session which no longer exists the conf will spin it up for you.

Re: Using tmux properly

#39
post #32

Does mouse copy and paste work correctly with tmux? I find that it selects spans across multiple panes. Is there a way to fix this or Windows or Linux?

Panes in tmux are only logical, not physical, you can't avoid it.

You can either maximize your pane (which is the best feature of tmux for me :)) or use the copy-mode (so, not the mouse)

Re: Using tmux properly

#40

What's the advantage of tmux over something like terminator with pane splitting?

Terminator is an alternative to something like iTerm. Tmux is server based so the sessions persist after disconnecting from ssh for example and allow multiple users to connect to the same terminal
Post reply on HN