An opinionated guide to reduce mouse and trackpad interaction while working on your computer

tl;dr - Learn vim and use vim plugins wherever possible.

Motivation

Have you ever been annoyed by switching back and forth between keyboard and mouse (or whatever you use) while working on your machine. Are you scared by taking your hands off your keyboard. Wasting precious seconds! Especially as a developer.

That’s the case at least for me. That’s why I started my mission to a keyboard only workflow. Remember the hackers in the Hollywood movies? Ever seen them using a mouse or similar? Probably not, just fancy shortcuts and console commands.

Overview

This article is mainly about the interaction on MacOs, but replacements exists for all the mentioned plugins/tools for Linux and Windows too.

Tools

vim

vim is one of the oldest text editor’s for unix systems and hence built in to MacOS. You can get an introduction into vim here and [here]*(https://www.openvim.com).

vim commands are the basis for shortcuts in editors, browsers ore terminal applications.

Browsing

For most of the modern browsers extensions or plugins exist to enable a vim-like navigation in websites and browser tabs. Use vim shortcuts in Safari via sVim extension and scroll up and down with j/k, open tabs with t and close with ‘x’. If you press f a highlighted unique character appears on every link on the page, just press the character next to ‘click’ on that link.

OS Applications

Apptivate is a useful tool to navigate your computer with the keyboard only. It enables system wide shortcuts to switch to application windows directly. No need for crazy Cmd-Tab (or Alt-Tab) cycles. I have a shortcuts for all major app like browsers, IDE’s or terminals. (Hint: Use Hyper Key via Karabiner-Elements)

E.g. switching to VSCode is just hitting CapsLock-V, Chrome sits on CapsLock-C. (Note: My CapsLock Key is mapped to the hyper key through Karabiner.)

Rectangle is another useful tool for window management. It provides system wide shortcuts to move/resize/arrange the windows with just one trigger. E.g. press Control-Option-Left to move the active window to the left half of the screen. You can also move windows between physical screens easily.

Extra Tip: Remap Ctrl-[HJKL] to move the cursor outside of vim. I also use Ctrl-[ as Escape key.]

Editing

Being a developer I spent most of my time in IDE’s and editors. vim extensions exist probably for all of them. This post is written in WebStorm with Markdown and vim plugin. Improves writing speed a lot. No need to even use arrow keys to move around in files. I haven’t figured out if such extensions exist for classical text editors like Word, but I never use those so I don’t care.

Last updated: 13 Okt 2022 :: Luis Höfer