Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Honest question - why would you use Tmux for local sessions?

I always thought the advantage of programs like Screen and TMux were that you could persist remote sessions over bad connections, or from different terminals (e.g., going home from the office and keeping the session alive).

For purely local sessions, I don't see an advantage over iterm + vim. That also seems to be the conclusion on StackOverflow [0]:

    [0] http://stackoverflow.com/questions/10015575/tmux-vs-iterm2-split-panes
[edit] - thanks for the feedback guys, I'll give it a try


Hi,

Claudio (one of the developers) here.

The motivation is that you can interact with the content of the panes both with shortcuts and programmatically, as an example I can link you this video:

http://www.youtube.com/watch?feature=player_embedded&v=J...

The other advantage is that if for any reason iTerm crashes or is closed by mistake, you can resume your session.


Great work Claudio! Will definitely give this a try soon.

-Ali


ie: for all those times I press ctrl-q accidently instead of ctrl-1


I'm with you there.


I use tmux with tmuxinator [0] to set up my dev environment every time I start work on a project. I have my panes configured (editor, shell, tests, db, logs, scm etc) and a 'pre' hook that mounts my VM. It works beautifully, is quick and easy to set up and is pretty flexible.

    [0] https://github.com/aziz/tmuxinator


There is also Consular (https://github.com/achiu/consular) for those who need similar functionality in plain Terminal/iTerm/Gnome Terminal.

It lets you create multiple terminal environments and each of them can define multiple tabs with startup commands. It uses a simple Ruby DSL for the scripting. The tabs can also be assigned meaningful names through the DSL.


I often work a heavy mixture of locally and remotely, so every time I start a new unit of work (very loose definition) I run a script I threw together that creates a new directory tree to work in, perhaps checks some things out, and creates a new named tmux session for that work. I then use an alias for `tmux attach-session -t` with zsh autocompletion for tmux to rapidly pick up where I left off on any number of things I was previously working on.

Since tmux works locally as well as remotely, I find this to be a great organizational trick.


Personally, I find working within tmux more productive than a vanilla terminal, even if I never touch the remote functionality.

This was probably due to being used to using terminator on xubuntu, which tmux has felt similar to for me, and because I prefer having something I can configure/script and commit to a repo. I think it's a bit like preferring awesomewm or xmonad over, say, Gnome or KDE.

In addition to that, this sort of thing is just nice, I think.


In addition to being in agreement with several of the other reasons mentioned here, I do most of my development on a netbook, and I find it easier to just have a single maximized terminal on a desktop, and use Tmux to manage my 'windows.'

[ Also more of a Linux thing, but is perfectly possible for X11 to crash without the whole machine going down, and my session remains unharmed. ]


I accidentally Ctrl + W my terminal window quite a bit. With tmux my session is persisted and I can get back to it easily.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: