Awesome tmux and iTerm2 Intergration

Don’t you just love tmux? With tmux your command line session could be always there even your terminal crashes or you accidentally closed the tab. But a few things bug me a little: 1. Scrolling history with mouse is painful. 2. Awkward keystrokes, switching window with {prefix}+num? I feel lazy (my prefix is C-q btw) 3. Copy-mode anyone? Press {prefix} + [ to enter copy mode, start selection, finish by {Enter}, however you can get away with holding ⌥ while selecting with mouse.

Basically, I want tmux be “more native”, good news it’s possible when you use iTerm2:

iterm preferences

Once the option is selected, you start your tmux session with command “tmux -CC” (or “tmux -CC attach” when you have tmux session already), it turns tmux windows into iTerm tabs, and even better, tmux panes become native iTerm panes, no more tmux mouse-select-pane hacks! Scrolling back? Searching history? All fixed :)

Another useful tip: use tmuxinator, it really streamlines my tmux workflow.

comments powered by Disqus