Live data from Hacker News

A Tmux Crash Course (2011)

robots.thoughtbot.com

41–50 of 85 posts

Re: A Tmux Crash Course (2011)

#41
post #40

I know everyone remaps their prefix to ctrl-a - how do you then jump to the start of a line? Edit: Thanks for the solutions. Will have a play. Like the sound of using ctrl-\

I guess you know this, but just for some context: ctrl-a is the default prefix for GNU Screen which was the unopposed leader in terminal management for a long time, so most people are just used to it.

As for the ctrl-a shortcut, I admit I use screen/tmux for mail, jabber and text editing/programming mostly, so I do not spend that much time in the shell where that shortcut would be handy. I just didn't use that shortcut until now.

Re: A Tmux Crash Course (2011)

#42
post #31
post #7

If you're willing to spend $14 for a more detailed tutorial, I'd strongly recommend _ tmux: Productive Mouse-Free Development_ from The Pragmatic Bookshelf. It goes through common use cases, common customizations, and pair programming. http://pragprog.com/book/bhtmux/tmux

I do not get the idea of buying a "book" to learn a *nix utility that explains itself in a single man page when all you need to learn is just a few keyboard shortcuts. Obsessively focusing on the tool does not magically improve productivity.

Dtrace has tomes and many hours expounded upon its usage; sadly it is not also available on Linux.

Re: A Tmux Crash Course (2011)

#43
post #40

I know everyone remaps their prefix to ctrl-a - how do you then jump to the start of a line? Edit: Thanks for the solutions. Will have a play. Like the sound of using ctrl-\

You map a to send the prefix: bind-key a send-prefix

Now when you type ctrl-a gets sent.

Re: A Tmux Crash Course (2011)

#44
post #42
post #31

Earlier quoted context omitted.

I do not get the idea of buying a "book" to learn a *nix utility that explains itself in a single man page when all you need to learn is just a few keyboard shortcuts. Obsessively focusing on the tool does not magically improve productivity.

Dtrace has tomes and many hours expounded upon its usage; sadly it is not also available on Linux.

Dtrace is also orders of magnitude more complicated than tmux.

Re: A Tmux Crash Course (2011)

#45
I like being able to shift+pageup in consoles to see history, but haven't got a good replacement for this in tmux. (Including when you switch to a new window and want to see something.) Usually I go into copy mode and scroll up. This works. But maybe there's a better way. Anyone know?

Re: A Tmux Crash Course (2011)

#46
post #40

I know everyone remaps their prefix to ctrl-a - how do you then jump to the start of a line? Edit: Thanks for the solutions. Will have a play. Like the sound of using ctrl-\

I've remapped my prefix to ctrl-\. I also have my capslock remapped as control. So two pinkys to hit my prefix.

Re: A Tmux Crash Course (2011)

#47

Boy, a tiling WM might just blow his mind.

Maybe, but personally I find that terminal windows are the only thing I tend to want to split the screen for. Almost everything else I prefer to run in full screen. If I had a 50" screen or something, I might feel differently, but with two smaller screens the two separate screens offer enough tiling for non-terminal windows.

I was planning on installing a tiling WM when I got my last laptop (I used to use Ion, so I'm used to the concept and wanted to give it another go), but frankly as much hate as Unity gets, once I had Ubuntu installed I realised that with some keybinding tweaks it was sufficient.

Re: A Tmux Crash Course (2011)

#48

I use Terminator ( http://www.tenshu.net/p/terminator.html ) primarily on local machines instead of screen/tmux(or byobu). I get the added benefit of scrolling. I tend to copy paste a lot from log tails etc into my my text editor for quick searches or other things. The infinite scroll feature(with a scroll bar) helps me out a lot. In tmux/screen i still haven't figured out a good workflow to copy a few screenful of c…

Have you tried tmux's mouse modes?

You can use the mouse wheel to scroll and highlight to copy. I think you are specifically trying to say the mouse highlight won't go past one window though, right?

You can also resize panels and select widows.

Re: A Tmux Crash Course (2011)

#49

I've been seeing tmux posts a lot the last couple of years, but I can't pull myself away from screen which I've been using for what almost a decade now? It has a higher chance of being installed by default on a remote system I don't have root on, and works just fine for everything I need so I haven't had a reason to switch yet.

If you happened to have mastered screen, all the more power to you. I know there can be a lot of power in screens rc and scripting.

Tmux was easier for me to understand and the default packages are much easier than patched screen.

Also, there seems to be a steady stream of features released for tmux. I've heard screen can be quite stagnant.

Re: A Tmux Crash Course (2011)

#50
post #40

I know everyone remaps their prefix to ctrl-a - how do you then jump to the start of a line? Edit: Thanks for the solutions. Will have a play. Like the sound of using ctrl-\

I don't - I use ctrl-s instead. Similar position so just as easy to hit, but it seems to clash with fewer important terminal keystrokes as it has been historically used for flow control in the terminal driver. Here's the relevant bit for .tmuxrc:

  unbind C-b
  set -g prefix C-s
  bind s send-prefix
  bind C-s if '! tmux last-pane' last-window
Post reply on HN