http://gettingstartedwithtmux.com
(Sorry if the self plug is not cool, I'm happy to delete this comment if it's not ok but I figure the community may get use out of my work)
One tweak I can't live without is having the same key bindings to seamlessly switch between tmux panes and Vim split windows. (https://gist.github.com/mislav/5189704)
TPM is also really useful for managing tmux plugins https://github.com/tmux-plugins/tpm.
My prefix key is Ctrl-Space. It's very convenient to press on the keyboard, I'm surprised to not see it used more widely (maybe because it's commonly bound to some OS utilities?).
YES, THIS! Setting up directional pane navigation to work with both tmux and vim panes as first-class entities was a huge workflow boon for me as well. It was a significant change that helped kick my setup over into vim+tmux+zsh as IDE vs. merely a collection of separate parts.
It's worth noting that some relevant bits of @mislav's stuff has been packaged up nicely as a Vim plugin:
https://github.com/christoomey/vim-tmux-navigator
I also just noted that @tarruda (of neovim fame) chimed in on @mislav's gist with his own independently created version of the Vim-side of things. It looks worth comparing some of the implementation details from @tarruda's work, he's done some stuff to eliminate redraws in Vim, etc.
Same thing here :) I also set `tmux attach -t base || tmux new -s base` as my start command in iTerm which kind of forces me to use tmux windows/panes/sessions instead of iTerm tabs. It took a while to lose the habit of hitting `cmd-t` but was definitely worth it.
The thing that sucks now is that I'm really not sure which parts of my environment can be optimised further other than learning new Vim commands :)
In iTerm, this would be a start command of:
login -fp YOUR_USERNAME /Path/To/local/bin/mux --prompt
Or used directly from a normal command line (with zsh completion [2]) as: mux <session_name>
Apologies to tmuxinator users for conflicting with 'mux'; obviously feel free to rename it. This is really just a part of my personal setup vs. a formally published utility, and I don't use tmuxinator.[1] https://github.com/jwhitley/tilde-local/blob/master/local/bi...
[2] https://github.com/jwhitley/zshrc/blob/master/.zfunctions/_m...
After I started getting used to using tmux, I found that my workflow naturally separated between things I'm doing on my terminal and things that require X (like my browser). These days I use a separate workspace for X apps and terminal (occasionally moving them around).
To make my life easy, I've added xmonad-like key bindings and window layout to tmux. Since other people are sharing:
https://github.com/ygt-mikekchar/dotfiles/blob/taka/home/.tm...
I often work while travelling and when I'm on the road I often don't bother cranking up X -- just work in the Linux console. Using tmux I barely notice a difference in my workflow and it helps extend the battery.
For anyone wondering you can achieve above by typing tmux new-session -t and giving it number/name of your current session.
Also there are minor things that are nice. Like if you need to open another terminal instance in the same directory as you're currently in.
Thank you so much for pointing me towards that vim+tmux gist!
I suppose this stops working if you SSH into some box and run tmux there? I've implemented something similar, but as an urxvt plugin instead, which avoids that limitation: http://www.cs.helsinki.fi/u/tmtynkky/urxvt.png (Once Alt-O is pressed, the hotkeys with the red background appear next to each link; pressing the hotkey opens the link in browser and copying to clipboard is also possible)
Liking the plugin you wrote!
[1]: https://github.com/jbnicolai/tmux/blob/master/.tmux.conf#L96
lol, my tmux keys are basically model after vim. This is the book I used to learn tmux and has vim key settings:
<bind>z
So you can remove this line from your config:
https://github.com/jbnicolai/tmux/blob/master/.tmux.conf#L98
That way I can attach to a remote tmux in a local session and not produce a terminal muxing singularity that swallows worlds.
1. I can still use C-a with readline (go to first character)
2. If I ssh and then use screen, I can use C-a to navigate my remote screen and C-s to navigate my local tmux.
3. C-s is closer to C-a then other letters on my keyboard.
C-s will suspend the terminal on some platforms. (Which can be resumed by C-q.)
When using both, especially nested, I found it beneficial to have a different leader for each.
I also use <^-a> to go to the start of the line, so I'd miss that.
My absolute favorite has to be binding a hotkey to opening URLs in the current window [0]. See [1] for a small demo I just recorded.
To get started, here's my current config: [1]
[0]: https://github.com/jbnicolai/tmux/blob/master/.tmux.conf#L12...
[1]: http://recordit.co/vdxy09GpYG
[2]: https://github.com/jbnicolai/tmux/blob/master/.tmux.conf