Monday, November 4, 2013

Re: why is terminal multiplexing (TMUX, Screen) useful with VIM?

On 2013-11-04 04:54, Gallagher Polyn wrote:
> My question is why wouldn't solo coding in the terminal with tabbed
> windows plus VIM alone be sufficient? Assuming no need to share
> one's terminal with others, what does terminal multiplexing give
> the VIM user that they don't already have?

In addition to screen-sharing, tmux (or GNU screen) offer a bunch of
other nice features:

- the ability to reattach from another machine and have everything
just how you left it. I regularly will start a tmux session on a
work machine, then come home and SSH into the machine to check on
it (everything is just where/how I left it in the session), then
re-attach back at work.

- if it's a remote machine, only connecting once. This is more a
factor if you need to enter a password, rather than using
passwordless public/private key auth. But even with passwordless
key-pairs, you still have to type "ssh u...@host" rather than
"{prefix key}c" to create a new connection on the same machine.

- the ability to monitor windows for activity/silence. This is nice
for backgrounding a compile and being notified when it goes silent
(usually means it's done) or watching a long-running quiet process
to get notification when it finally has some output. I used this
feature a LOT back when I did C/C++ work.

- depending on your tabbed terminal windows, terminal multiplexors
usually offer some split-screen abilities (last I checked, GNU
Screen only offered horizontal splits; tmux had both vertical &
horizontal splits). Since Vim doesn't have a way to include a
terminal window inside Vim unless you rebuild it with unofficial
patches, this allows me to have an editor in one {screen|tmux}
window and a shell in the other and be able to see them together.
I don't use it much, but it's nice to have when I do need it.

- tmux offers the ability to transmit keyboard input to all
linked/synchronized windows, so you can connect to multiple servers
and then issue the same commands and they get run across all of
them. I believe Screen offers a similar ability to broadcast
keystrokes to all windows, but with a clunkier interface. Sort of
a poor-man's "clusterssh". I've not needed this one, but it's
there in case you manage clusters or develop/deploy with them.


Those are just a few of the things that come to mind. Some might be
replicated by a tabbed terminal window; others less so.

(ripped somewhat gratuitously from my post to comp.lang.python on the
same topic[1])

-tim


[1]
http://code.activestate.com/lists/python-list/633671/








--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: