Cover image from ssh as part of my workflow

ssh as part of my workflow

December 10, 2014

Have you ever been in the situation where the discovery of a technology or technique has rendered previous workflow comically inept and wasteful. One such example would be the discovery of the “edit multiple frames” button in Adobe Flash Professional. I had spent so much time moving from frame to frame to edit a tween. Then to discover that I could choose the entire animation as one and edit. Joy and sorrow in the one same wave of realisation. I had a similar road to Damascus moment recently.

Multiple frames selected inside the Adobe Flash user interface

I have begun experimenting with a couple of further open source tools for development. These are predominantly the old school *nix tools that have been about for a while. I had been using VIM on and off for a few years as an editor, mostly confined to editing random documents on a server somewhere. A while ago I had gotten up and running with Git. This summer I spent some time looking into and setting up a Vagrant box. I moved my dotfiles to a GitHub repository and used sub-modules to load my VIM packages. I used rsync to sync up development boxes. I was using sshfs to mount filesystems on other devices.

Tmux

Screenshot of tmux running a session with vim, htop, tig, and tail running

In short, I was starting to get a glimpse of what I had often referred to as the IDE of tools central to the *nix philosophy for development. Then I started using tmux and tmuxinator. I had tried i3 and loved it, however there is a flaw. Coming from the Mac world the idea of tiling for windows is counter-intuitive. Launch GIMP with i3 and it operates in a bizarre manner. It’s not the right paradigm. However, the same tiling (well, windows/panes) concept works fantastically with tmux because:

  • Your login is maintained between sessions,
  • Only works with terminal based applications,
  • tmuxinator allows you to pre-configure a session to your liking and then launch it as required,
  • Leaves traditional desktops to work with traditional (mostly graphical) applications,
  • Can be done with any machine with a TTY and keyboard.

So, with setup I can configure tmuxinator to open all required project tools with a line such as:

tmuxinator start acme_project

This in turn could start:

  • tail program on a log,
  • grunt to process/compile less and js files,
  • vim on multiple files,
  • monitoring software,
  • setup names for each window.

Then, the cherry on the cake, I can disconnect from this session and return to it later. Perhaps on another machine. Perhaps from two machines at the same time.

Even the most configurable and versatile IDE that I have used in the past doesn’t come close to this level of ease and customisability. I think key to this is another *nix philosophy, everything is simply shunting text around, so there is no requirement for the overhead of complicated GUIs.