· software-development

Experiments in not using the mouse

Priyank and I have been pairing a bit lately and we thought it’d be interesting to try and not use the mouse for anything that we had to do while pairing.

Editor

Priyank uses GVim (Yehuda Katz recommends MacVim if you’re using Mac OS) so we already don’t need to use the mouse at all when we’re inside the editor.

One annoying thing we found is that sometimes we wanted to copy stuff from the terminal into GVim and couldn’t think of a good way to do that without selecting the text on the terminal with a mouse and then ‘Ctrl-C’ing.

A bit of Googling led us to the xsel command which takes standard input and makes it available on the clipboard.

For example we’ve been using sed and wanted to copy the code we’d been spiking into a shell script:


# code to replace backslashes with pipes in a file
echo "sed -i 's/\\/|\g' some_file.text'" | xsel -bi

In OS X we have ‘pbcopy’ which allows us to do the same type of thing.

Once we’ve got that onto the clipboard we need to use ‘Ctrl R’ followed by ‘+’ in order to paste into GVim.

The next step is to get away from having to use the arrow keys which are annoyingly far away from all the others on a full sized keyboard but we’re not there yet!

Browser

We’re using Chrome so Priyank has installed the Vimium extension which allows us to use Vim shortcuts inside Chrome.

So far I’ve only been using the ‘f’ command which gives you key combinations to click on any of the links on the page but it’s still much more fun than having to scroll around with the mouse!

If anyone has any other tips or tools for us to experiment with that’d be cool to hear about - it was much more fun constraining ourselves slightly and seeing how we got on!

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket