> One tweak I can't live without is having the same key bindings to seamlessly switch between tmux panes and Vim split windows.
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:
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.
> It was a significant change that helped kick my setup over into vim+tmux+zsh as IDE vs. merely a collection of separate parts.
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 :)
Heh, I have something similar, with a tmux session-start script[1] that's the first thing run by my default iTerm windows. It displays and lets me select from existing sessions via prompt tab completion. Or I can just enter a new session name at the 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.
Honest question: Is there any benefit of using tmux over a proper tiling window manager? Or, why would I want to delegate some of the window manager tasks to a terminal emulator?
I use both a tiling window manager (xmonad) and tmux. The main reason I started using tmux was to do pair programming sharing the same terminal via ssh. If you pair program and have never tried this before, I highly recommend trying it. I live in Japan and even pair with people in London using tmux and vim. It's the next best thing to being there.
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:
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 me it's having two different terminals connected to same tmux session. I use tiling window manager and work on two monitors. Sometimes there is some stuff that I'm working on on my main monitor but I want to have quick look at the terminal. Because I have two terminals opened on both monitors I can just switch to the other one, press ctrl+f(my prefix)+number and have exactly same window as in my main terminal.
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.
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.