tmux Icon


tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen.
9 Stories
All Topics


Tmux for mere mortals

Serge Zaitsev:

So, I ended up doing 80% of my work in terminals with tmux. But, the prefix thing? Pardonnez-moi, but usability matters. Pressing a chorded prefix hotkey only to press another chorded hotkey to perform a single action is clear nonsense.

With this in mind, I decided to customize my tmux to use only simple chorded hotkeys without a prefix for most common actions, and to make them easy to remember.

He shares his resulting tmux.conf and the reasoning behind the system he devised.

Tmux for mere mortals

Thoughtbot Icon Thoughtbot

Templating tmux with tmuxinator

If you’re a tmux user, but you’ve never heard of tmuxinator… it’s time to fix that. Simon van Dyk has a solid intro to it on Thoughtbot’s blog:

tmuxinator is a ruby gem that allows you to easily manage tmux sessions by using yaml files to describe the layout of a tmux session, and open up that session with a single command.

I’ve been using tmuxinator for years and highly recommend it. 👌


vim-zoom: Zoom in and out of vim panes

As an avid vim + tmux user, <prefix>-z is an essential tmux command to zoom the current pane for the times I want to see my editor or command output at its maximum size. The vim-zoom plugin brings this same concept directly into vim by adding a <C-W>m mapping that will zoom the current split to be full screen. Triggering the mapping again brings back the original pane layout, making this an effective tool when needing to focus on a specific split when necessary without losing your splits layout!

vim-zoom: Zoom in and out of vim panes


Multi-user tmux made easy with wemux

Two of the many things in the development community that are growing in popularity are remote work and pair programming. Traditionally, pairing meant you had two people looking at the same computer and one person doing the typing. This is great, as long as you are in the same room.

What about those developers, like myself, who rarely (if ever) find themselves in the same room as their coworkers? Enter wemux by Matt Furden, the tmux tool that makes it simple for multiple users to connect to the same tmux session so you can see the same thing.

The only requirement, according to the README, is tmux >= 1.6. Installation is simple, with the preferred method being Homebrew:

>> brew install

After installation, you — the host — would start a new wemux server:

>> wemux start

At this time, anyone else — the clients — could connect with any of the following three commands:

  • wemux mirror - attach to the server in read-only mode.
  • wemux pair - attach to the server in pair mode, where both the client and the host can control the terminal.
  • wemux rogue - attach to the server in rogue mode, where the client and host can work independently of eachother.

There are plenty of other features, from listing users to running multiple wemux servers at once. Once you get the hang of it, pairing while working remotely becomes much simpler than screen sharing on Skype!

You can find out everything you need to know in the README or discuss this post on HackerNews.


vimux - Simple, extensible vim integration with tmux

You may recall Josh gushing about tslime on Episode 0.7.3. While tslime makes it easy to send input from Vim to a tmux session, Ben Mills wanted a bit more, so he created Vimux. Vimux gives you a tmux pane in which to execute commands, all without losing focus in vim.


Commands can easily be set up in your .vimrc to do common tasks:

" Prompt for a command to run
map rp :PromptVimTmuxCommand

" Run last command executed by RunVimTmuxCommand
map rl :RunLastVimTmuxCommand

" Inspect runner pane
map ri :InspectVimTmuxRunner

" Close all other tmux panes in current window
map rx :CloseVimTmuxPanes

" Interrupt any command running in the runner pane
map rs :InterruptVimTmuxRunner

Check out Ben’s introductory blog post for background and how they’re using Vim and tmux at Braintree (which I highly recommend for payment processing by the way).


teamocil: Ruby and YAML-powered terminal layout manager for tmux

It’s a bit ironic that as a UX developer I spend most of my time in the terminal. That’s why I’m always on the lookout for new tools that improve my command line user experience.

My latest find is Teamocil a nice Ruby gem from Rémi Prévost that manages your tmux layouts. For those new to tmux:

tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

Here’s a quick look at a simple Teamocil and tmux layout in action:


To set up your own tmux session, you’ll need to install it via your favorite package manager. On the Mac, I use Homebrew.

brew install tmux

Next, you’ll need the Teamocil gem:

gem install teamocil

Now we need to set up our layout:

mkdir ~/.teamocil
touch ~/.teamocil/styles.yml

Here’s my quick 50-50 split example from the screenshot:

thechangelog » cat ~/.teamocil/styles.yml                          ~/Blogs/thechangelog  
  - name: prototype
      - cmd: cd ~/hp/code/styles
      - cmd:
        - cd ~/hp/code/styles
        - serve
        width: 50%

Now we just run tmux and teamocil:

$ tmux
$ teamocil styles

Be sure and check the Readme for more info or how to create vertically split layouts, too.

[Source on GitHub]

0:00 / 0:00