Live data from Hacker News

tmux 1.8 Released

tmux.sourceforge.net

101–110 of 162 posts

Re: tmux 1.8 Released

#101

I want to like tmux, I really do, but my main gripes are scrolling in panes with the scroll wheel and selecting / copy/pasting text. iTerm (osx) or Terminator (linux) handle that much better, although I admit they can't really be compared technology-wise. Alternatively, I never figured out how to select / copy text just as fast in tmux / vim / etc as with the mouse.

Use iTerm2. One of the new features of tmux is

> * Control mode, which is a way for a client to send tmux commands. > Currently more useful to users of iterm2.

With this, if you connect to tmux via iTerm2, you can get it to pop up a window with tabs for each shell in the tmux session. History via the mouse wheel is native, changing tabs is native, new tab is native. Essentially you don't need to know any of the tmux commands at all unless you connect from a terminal program that doesn't know the protocol.

Re: tmux 1.8 Released

#102
post #96
post #74

Earlier quoted context omitted.

Emacs users should be using Emacs as their terminal multiplexer...

Could you elaborate? I'd love to try that.

; Open a terminal

M-x ansi-term

; Rename the buffer (escaping shell mode first)

C-c C-j M-x rename-buffer

; Shell responds to keyboard again

C-c C-k

; Split window in half horizontally

C-x 2

-----

I stole this (possibly from Steve Yegge or another source) long ago to somewhat automate the process of renaming terminal buffers:

  (global-set-key (kbd "") 'visit-ansi-term)

  ;; Terminal awesomeness
  (require 'term)
  (defun visit-ansi-term ()
    "If the current buffer is:
       1) a running ansi-term named *ansi-term*, rename it.
       2) a stopped ansi-term, kill it and create a new one.
       3) a non ansi-term, go to an already running ansi-term
          or start a new one while killing a defunt one"
    (interactive)
    (let ((is-term (string= "term-mode" major-mode))
          (is-running (term-check-proc (buffer-name)))
          (term-cmd "/usr/local/bin/zsh")
          (anon-term (get-buffer "*ansi-term*")))
      (if is-term
          (if is-running
              (if (string= "*ansi-term*" (buffer-name))
                  (call-interactively 'rename-buffer)
                (if anon-term
                    (switch-to-buffer "*ansi-term*")
                  (ansi-term term-cmd)))
            (kill-buffer (buffer-name))
            (ansi-term term-cmd))
        (if anon-term
            (if (term-check-proc "*ansi-term*")
                (switch-to-buffer "*ansi-term*")
              (kill-buffer "*ansi-term*")
              (ansi-term term-cmd))
          (ansi-term term-cmd)))))

Re: tmux 1.8 Released

#103

I love web pages like this. The top of it reads: "tmux is a terminal multiplexer" "What is a terminal multiplexer? It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal. And do a lot more. See the manual." That's awesome. So many times someone posts on HN "CaffBook.ly.errr 0.98 now released" and I have no idea wh…

I appreciated it too. I've heard tmux mentioned plenty of times but never with a mention of what it is/does. That one line did it.

Re: tmux 1.8 Released

#104
post #74
post #42

I realise you can rebind them, but both screen and tmux do themselves a disservice by choosing binding keys which overlap with prominent keys in emacs and for users who use emacs mode in their shell. First impressions count. If you want to configure tmux to use just a backtick as the escape, create ~/.tmux.conf unbind C-b set -g prefix ` bind-key ` send-prefix When you need to type a backtick just press it twice. For…

Emacs users should be using Emacs as their terminal multiplexer...

One reason to run Emacs in tmux is if you work on remote machines over, e.g. ssh. Emacs in tmux (or screen) lets you detach, log out then log back in and re-attach to the remote session with Emacs still running. That's amazingly handy.

Re: tmux 1.8 Released

#105
post #34

If you like tmux, also check out teamocil ( https://github.com/remiprev/teamocil ) to really enhance your use. It enables you to define tmux sessions via YAML, which is great for programmatically setting up a complex dev session. Mine, for example, fires up six panes in my preferred layout, and starts up a particular part of our project in each pane.

Upvote for the best named project I've ever seen.

There's no 'i' in Timocyl, at least not where you think!

Re: tmux 1.8 Released

#106
post #104
post #74

Earlier quoted context omitted.

Emacs users should be using Emacs as their terminal multiplexer...

One reason to run Emacs in tmux is if you work on remote machines over, e.g. ssh. Emacs in tmux (or screen) lets you detach, log out then log back in and re-attach to the remote session with Emacs still running. That's amazingly handy.

Another option is tramp[1], which lets you open files remotely (generally via ssh/scp). Not the same thing, but often accomplishes the same goal.

[1] http://www.gnu.org/software/tramp/#Top

Re: tmux 1.8 Released

#107
post #34

If you like tmux, also check out teamocil ( https://github.com/remiprev/teamocil ) to really enhance your use. It enables you to define tmux sessions via YAML, which is great for programmatically setting up a complex dev session. Mine, for example, fires up six panes in my preferred layout, and starts up a particular part of our project in each pane.

If you don't like the YAML format of teamocil or tmuxinator and just want to write shell scripts to do the same thing, check out tmuxstart: https://github.com/treyhunner/tmuxstart

I made it shortly after switching to tmux last year. I hope this kind of functionality will eventually be built-in to tmux.

Re: tmux 1.8 Released

#108
post #69
post #34

If you like tmux, also check out teamocil ( https://github.com/remiprev/teamocil ) to really enhance your use. It enables you to define tmux sessions via YAML, which is great for programmatically setting up a complex dev session. Mine, for example, fires up six panes in my preferred layout, and starts up a particular part of our project in each pane.

I only glanced it over, but I'm having a hard time seeing the advantage of this over shell scripts calling tmux commands.

I agree. It takes surprisingly few lines of code to make a nice wrapper with some shortcut aliases/functions to simplify the scripts. My whole tmux workflow is managed by about 30 lines of code to bootstrap by tmux session management: https://github.com/treyhunner/tmuxstart/blob/master/tmuxstar...

Re: tmux 1.8 Released

#109
post #74
post #42

I realise you can rebind them, but both screen and tmux do themselves a disservice by choosing binding keys which overlap with prominent keys in emacs and for users who use emacs mode in their shell. First impressions count. If you want to configure tmux to use just a backtick as the escape, create ~/.tmux.conf unbind C-b set -g prefix ` bind-key ` send-prefix When you need to type a backtick just press it twice. For…

Emacs users should be using Emacs as their terminal multiplexer...

Well - it's my tool of choice for editing Makefiles. :) But that's all I use it for. My vim setup automatically hammers tabs to spaces, and make doesn't like that.

Shell users who use emacs mode (most ppl) may be annoyed by ctrl+a missing.

Re: tmux 1.8 Released

#110
post #47

Earlier quoted context omitted.

Ah, that looks excellent for more complicated setups. I've been using the slightly simpler tmuxinator. https://github.com/aziz/tmuxinator

I used to use tmuxinator, but it's pretty much abandoned. There are pull requests that are over a year old. On the other hand, I submitted a pull request to teamocil and it was merged the same day.

I'll actually help maintain tmuxinator now. :) The project is really awesome but the author doesn't have enough time for it, so he added me to the project a few days ago. I'll go through the pull requests soon.
Post reply on HN