4 ms·
Worth noting that you can enable mouse mode which is significantly easier for scrolling. It's also recommended by most people that you remap Caps-Lock to Ctrl a
by n0us 11y ago
Worth noting that you can enable mouse mode which is significantly easier for scrolling. It's also recommended by most people that you remap Caps-Lock to Ctrl and change the activation key from b to a. There are some great themes that make it nicer to look at as well.
I use tmux all the time for things like sshing into a vagrant box. As soon as I'm in I can switch between the tail of my logs, the readout of my build tool, the dev server readout etc. No more fumbling around starting multiple ssh sessions in multiple iTerm tabs. tmux honestly has been a game changer in terms of productivity just because of how easy it is to open things up and look at them. For those who are wondering why you wouldn't just use tabs in iTerm, its really more of an "also" not an "or"
- branchless 11y agoI use emacs and most keys are bound. I'm really wondering what emacs devotees use with tmux.
- sbagley 11y agoTry this: unbind C-b set -g prefix ` bind ` send-prefix
- robenkleene 11y agoI use Emacs on and off, as well as Vim, and the key I've settled on for tmux prefix is ^q. It doesn't conflict with anything useful (that I've found anyway) and it's easy to hit with a caps lock as control. For the record ^b is also move backwards by character in basic readline bindings (so it works in Emacs, on the command line, and everywhere on OS X). I've always found it baffling the programs like tmux and screen override readline bindings. Shouldn't those be on the list of bindings to never override?
- Saser 11y agoIn zsh (or at least with my configuration, which is prezto with a few plugins), Ctrl-q lets you "stash" your current command. Say that you are typing some really long, complex command, and suddenly you realize that you are in the wrong folder. You press Ctrl-q (which clears the command and "stashes" it), then you cd to the right folder. As soon as you return to the prompt after issuing your cd command, your really long, complex command is back just as you typed it.
- Scarbutt 11y agoC-z for the tmux prefix key.
- scentoni 11y agoI use ^t because I never use the transpose-chars function.
- superbaconman 11y agoRemap ctrl-b to ctrl-alt-b unbind C-b set -g prefix M-C-b bind M-C-b send-prefix
- smw 11y agoControl-a is 'beginning of line'. Why would you possibly pick that?
- Veratyr 11y agoA lot of people aren't used to the Emacs bindings. Home and End are still widely used. Really annoys me when I have to work on a server that has the Ctrl-A bindings in tmux though.
- n0us 11y agoControl-s/e/d/f/whatever you want then. The point is to avoid having to reach all the way over to 'b'.
- sp332 11y agoIt's what screen uses by default, and a lot of people come to tmux from screen so they already have the muscle-memory. Not sure of the original logic though.
- bphogan 11y agoYou set prefix to C-a and then send double-presses on. So C-a-a still does beginning of line.
- CardenB 11y agoProbably because that's how screen did it before tmux
- nilkn 11y ago> For those who are wondering why you wouldn't just use tabs in iTerm, its really more of an "also" not an "or" In my case, I tend to ssh to one remote host, where I have a tmux session running with its own tabs, each of which is ssh'd to a bunch of other machines (10+). By doing it this way, I can access all my remote ssh sessions from anywhere by just accessing that one initial machine and connecting to the tmux session. I currently use tmuxinator to recreate the whole elaborate construction if I ever need to.
- xufi 11y agointersting use. I always wondered if that was managable because I'd be afraid to lose track of all those machines
- jakupovic 11y agoI do the above as well with 1 addition, any of the virtual tabs on my remote host can also run a screen themselves. To control this I use Ctrl-Oo to control the outer screen and ctrl-a for inner screens. This is useful when you have a remote dev server for a particular app and want need multiple connections to it, such as running nodejs server and tailling the output in one shell while using the editor in the other. I only started using this recently but it has worked very well.