Increased Developer Productivity with Tmux, Part 9: Terminal.app
Using Tmux and Terminal.app together
In Part 8 I showed how to use copy mode proficiently. In this episode I go over using Tmux within the OSX GUI console tool Terminal.app. Conventional wisdom might be that you don't really need GUI console app now that you are rocking with Tmux. Or perhaps you might just need the GUI console app for a single console window and then Tmux takes over from there handling all your command line needs. That might be the case for other developers but I still use my GUI console tool heavily in conjunction with Tmux. Let me show you how.
.. I still use my GUI console app heavily in conjunction with Tmux
- Here is a typical Terminal.app setup on my development box.
- I run Terminal.app in full screen mode, which completely blocks out all other windows, aiding in removing distractions keeping me focussed.
- Let's take a look at the Terminal.app preferences
- I use the "Pro" theme, 18pt Monaco and my usually display resolution is 2560 x 1440 (for screencasts I run the display at a lower resolution).
- Within the Keyboard group make sure to check "Use option as meta key".
- M-1 select-layout even-horizontal
- M-2 select-layout even-vertical
- M-3 select-layout main-horizontal
- M-4 select-layout main-vertical
- M-5 select-layout tiled
- bind-key M-7 resize-pane -t 1 -x 90
- bind-key M-8 resize-pane -t 1 -x 60
- bind-key M-9 resize-pane -t 1 -x 30
- bind-key M-0 resize-pane -t 0 -x 30
- Back to the Terminal.app/Tmux workflow. To move between tabs use
Command - {
to move left a tab andCommand - }
to move right a tab. - Naming a Terminal.app tab is done by typing
Command - i
. - Copy and pasting between standalone Vim instance in separate tabs is something I do all the time. If you use line numbering make a leader command enabling you to quickly toggle line numbering on and off as when in Tmux copy mode the line numbers will get recorded.
- Random tip: Don't use a separate Terminal.app tab for services. Make a Tmux window instead.
- Random tip. Consider running your development browser in full screen mode as well to aid in preventing distractions.
Tmux uses meta keys for adjusting window pane layouts. By default, <prefix> — <meta key> — 1-5
do the following:
In addition I have bond 5 additional layouts:
See Part 2 for a demonstration and more discussion.
See episode 8 where I explain Tmux copy mode in depth.
That concludes installment 9. Using Tmux within Terminal.app
That will also bring the entire Increase your developer productivity with Tmux series to an end. I vastly enjoyed being able to convey my knowledge on this topic. In the same way, let me know about methods you have employed to increase your output by using Tmux or other tools. As programmers and developers this really comes down to keeping our tools sharp and sharpening is a continual and life-long process. Therefore, let us press on to learn and share our outcomes and techniques with the developer community at large so that we may collectively and immensely increase our productivity.
Regards — Minimul
If you like this article and screencast go to the dedicated page for this series at http://minimul.com/teaches/tmux.
- Pushed on 07/21/2014 by Christian