An Overview of a Mouseless Development Environment
Tags: productivity, tech, vim, shell
Published: 2020-08-17 09:23:13

---
title: An Overview of a Mouseless Development Environment
published: true
description: Did you heard about scalable development environments centered around the shell? Are you ready to abandon your mouse? No? You think it's stupid? Here's the chance to prove to the world that you're a powerful open-minded developer. Dive with me in a Mouseless Development Environment.
tags: #productivity #tech #vim #shell
cover_image: https://thevaluable.dev/images/2018/env/mouseless_development_environment.png
canonical_url: https://thevaluable.dev/mouseless-development-environment-overview/
---

![Building your Mouseless Development Environment](https://thevaluable.dev/images/2018/env/build_workshop.jpg)

Once upon a time, I was a proud Ubuntu user. It was easy to install and easy to use. I was a Windows user before that: `Ubuntu` was feeling similar.

Months after month, my pride decreased as much as my annoyance increased. Ubuntu was letting me down:

* Weird display bugs was popping from time to time.
* It was pretty slow.
* I had to compile manually a lot of applications not available in the official repositories.
* I had to compile manually a lot of applications totally outdated in the official repositories.
* I had to learn a lot of *random* shortcuts to use my keyboard as much as possible, for basically every tool.

I didn't know better, so I stuck with it for years. One morning, fresh and motivated, I decided to upgrade my [LTS](https://wiki.ubuntu.com/LTS) version. Everything crashed. I couldn't even start Ubuntu anymore. I tried to fix everything, but I had no clue about Linux at the time. Where to begin? What to do? The Ubuntu forums were not helpful, so I decided that it would take me less time reinstalling everything.

The bitterness filling my heart was unstoppable. Ubuntu, my old friend, let me down again, in a spectacular way.

Luckily enough, some months later, I had the pleasure to work with amazing developers who [showed me how to build a very effective development environment](https://dev.to/phantas0s/improving-by-experimenting-32af). 

My whole workflow shifted from there. I went from Ubuntu to Arch Linux, from Unity to i3, from PhpStorm to Neovim. After years of silent struggle, I finally had a scalable, stable, up-to-date, and very efficient system. I even wrote a bunch of scripts to install [everything I need in one command line](https://github.com/Phantas0s/ArchInstall). Everything I needed to get things done was ready to serve my ambitions.

It was one of the best shift I did in my career. No more, no less. Why?

* I learned a ton about Linux thanks to `Arch Linux`. 
    * It's important to know how things work under the layers of abstraction of your OS, to be able to solve possible problems.
    * Knowing about Linux is mandatory to me for any developer out there, since web servers are mainly running on a Linux based system.
* I have consistent shortcuts (keystrokes) throughout almost every tool I'm using.
* I can use 90% of my system with the keyboard only. If I can remember them, it's because *they make sense*, much more than the typical GUI shortcuts, like `ctrl + shift + alt + e`.

When I switched to the tools I use today, I really understood how important it is to have a good, efficient, and scalable development environment. *I was feeling at home*. It was finally a system which answers **my** needs, and not a system I was fighting against.

Developing became more enjoyable. Sorry, it's an understatement: coding was 10 times more fun!

In this article we'll speak about:

* Why the Linux shell is the best tool you have, as a developer.
* Why using Arch Linux.
* What is i3.
* How to have a powerful terminal with urxvt, tmux, and tmuxp.
* An editor where you can leverage the power of the Linux shell, giving you the most powerful IDE I've seen to date.
* Improving git in the terminal.
* A better experience with MySQL and PostgreSQL in the shell.

Interested? Come with me. I will introduce you to the fantastic world of a Mouseless Development Environment.

## Your Best Friend, the Shell

![linux shell](https://thevaluable.dev/images/2018/env/env_01.png)
*Simple et efficient shell*

In this article, I will refer to the [shell](https://en.wikipedia.org/wiki/Unix_shell) pretty often. The most common are bash and [Zsh](https://thevaluable.dev/zsh-install-configure/); I use the second and I highly recommend it.

### The Power of Plain Text

You might wonder: why using a text-based shell?

* You have access to **many** applications. Even if you don't have the very specific tool you need, you can develop it more easily for the shell; no need to design a GUI on top of it.
* It's easier to give a lot of optional possibilities to the end user, letting him do exactly what he wants. You can't put 20 buttons on a graphical interface? With a command line based application, you can have 20 options.
* The [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy) allows you to use specific tool for a specific need. Using [pipes](https://en.wikipedia.org/wiki/Pipeline_(Unix)) to throw the output from one tool to the input of another give you endless possibilities.
* You can automate (boring) common tasks very easily using the shell. Automating is key to increase your productivity and saving your mental energy where you need it.
* Command lines are often really fast. No heavy graphical interfaces full of 3D menu and whatnot to slow down your computer.
* [CLIs](https://en.wikipedia.org/wiki/Command-line_interface) don't usually take a lot of memory. This can save you when you modify 5 different microservices with Chrome eating 80% of your RAM.

> Command-line tools can be 235x faster than your Hadoop cluster.
*Adam Drake*

I encourage you to use the shell as much as possible. It can be a bit tough at first, but the benefits are insane.

What about graphical interfaces on top of CLI applications? To me, it has serious disadvantages:

* It can hide a lot of functionalities you would access easily with the CLI.
* You won't be able to solve (or even understand) any bug coming from the CLI layer.

Things get confusing when you need to:

* Use the tool on a remote server without your graphical interface.
* Explain to a less experienced developer how the tool really work. You can explain the GUI, not really the application itself, especially if the terminology between the GUI and the CLI is different. It happens more often than not.

I have a real life example with `sourcetree`, a graphical interface for [git](https://en.wikipedia.org/wiki/Git). I worked with a junior developer who was using it without knowing how `git` was working. When problems popped up, it was difficult to know what command the GUI was calling under the hood. It was more frustrating than simply using the CLI `git` in the shell.

### A Mouseless Approach

With the shell, you use mainly your keyboard. It might surprise some of you, but I try to avoid my mouse as much as possible. This is one of *most important advice about efficiency* I can give: keeping your hands on your keyboard might make you faster, but, more importantly, it will make you happier. 

Here are some advantages of the mouseless approach:

* Moving your hand from your keyboard to your mouse is tiring. You'll feel it if you stop doing it.
* It's more enjoyable to stay on your keyboard. You don't have to switch constantly between typing and moving a pointer.
* You will feel like a hacker even if you only write your shopping list! How cool is that?

---------

*I'm currently writing a [book to build your own Mouseless Development Environment](https://themouseless.dev/), where I explain everything in details.*

---------

## Arch Linux: Grab the Latest, Up-To-Date Software

![arch linux screenfetch](https://thevaluable.dev/images/2018/env/env_02.png)
*Arch Linux running smoothly on a VM*

[Arch Linux](https://www.archlinux.org/) has a lot of advantages compared to other Linux distribution.

### A Rolling Release System

What the heck is a **rolling release system**? The Arch Linux community update constantly everything for us, the users, from the obscure tool you're the only one using to the Linux kernel. When you install a new program, you can be sure you have its latest version.

No need to ask yourself if you miss great features and bug fixes for your favorite tools. You'll have the most up to date system you can find.

What about the applications available? The official repositories of `Arch Linux` are huge. You will find most of the time what you need there. If you don't, you have access as well to the [AUR](https://aur.archlinux.org/?setlang=de) (Arch User Repositories) where you can find everything else. I'm not exaggerating. After years using Arch Linux, the AUR still surprise me.

The only downside: the applications from the `AUR` are not always well tested. Proceed with cautions. It's easy enough to check their build to know what's happening if you install them, however.

When you install `Arch Linux` from scratch, you can choose exactly what application you want to install. **Nothing you don't want will pollute your hard disk**. No useless applications will run in the background without your consent. You are the master of your destiny.

The community around Arch Linux is huge, too. They usually know what they are speaking about and don't throw random shell commands on stack overflow without explanation whatsoever (I look at you, Ubuntu community).

Who needs stack overflow, anyway? The [Arch Wiki](https://wiki.archlinux.org/) is the best Linux wiki you can find. Again, this piece of art still surprise me today. There is everything in there.

Now, you might ask yourself: is `Arch Linux` stable? Will it crash every two weeks, letting you alone and helpless?

You will find many people preaching exactly that on The Internet. My advice? Don't listen to them. I use it on a daily basis for 5 years now. It never crashed, or very early, when I was playing with the installation process.

If you are careful with the `AUR`, you can count on a very robust, lightweight, and customizable Linux distribution.

Sometimes `pacman` (not the yellow cheese addict to pills, but Arch Linux Package Manager) will ask you to do some manual modifications. It's always documented on the [official website of Arch Linux](https://www.archlinux.org/) and can be solved in no time.

## Manage Your Windows With i3

![i3 windows manager](https://thevaluable.dev/images/2018/env/env_03.png)
*i3 windows*

`Arch Linux` doesn't come with any type of desktop or windows manager. You'll need to install your own. My choice without hesitations: [i3 windows manager](https://i3wm.org/).

This is a very light, fast and simple-to-use windows manager. There are no fancy 3D effects with `i3`. Everything is made for you to be efficient and productive, without being visually repulsive.

With `i3` you can create `workspaces`. They take a whole screen and can be moved from one screen to another. In these `workspaces` you can open one or multiple `windows`. They will embed your favorite applications.

Simple, isn't it? Now the best part: you can do everything with your keyboard easily. You can open, move and close `workspaces` or `windows` with simple keystrokes. You can resize `windows` with other keystrokes. You can open your favorite application using keystrokes.

Everything feels logical. I was able to use `i3` efficiently two or three days after installing it the first time. Your [muscle memory](https://en.wikipedia.org/wiki/Muscle_memory) will work for you here to remember the keystrokes you need.

The configuration possibilities are huge. If you want to try it, I have an article which help you go through a basic [i3 config](https://thevaluable.dev/i3-config-mouseless/), step by step. After that, you'll understand i3 enough to customize it as much as you want.

Obviously the Arch Linux wiki has a [good documentation about i3](https://wiki.archlinux.org/index.php/i3).

## Urxvt, Tmux and Tmuxp: Your Terminal Is Now a Productivity Beast

![tmux](https://thevaluable.dev/images/2018/env/env_05.png)
*Tmux in Urxvt with 4 panes open and two windows*

I tried a bunch of [terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) and [Urxvt](https://wiki.archlinux.org/index.php/Rxvt-unicode) was the best choice I found.

It's a very lightweight and fast terminal, especially if your run `Urxvtd`, `Urxvt` daemon. Spawning terminals everywhere becomes easy and painless.

That being said, I've rarely more than two or three terminals open at the same time, thanks to [Tmux](https://en.wikipedia.org/wiki/Terminal_emulator). It's a powerful terminal multiplexer (like [screen](https://en.wikipedia.org/wiki/GNU_Screen) on steroids) which allows you to:

* Create `sessions`, which include `windows` and `pane`.
* Open as many `windows` in your terminal as you want. Each `window` take the whole terminal window, and can be divided into `pane`. You want 3 `windows` with 4 `pane` each (for a total of 12 different shells open)? `tmux` can handle that easily.
* Detach and attach your `session`. Imagine that you close your terminal by mistake: you can recover your whole `tmux` `session` by opening a new terminal, and attaching your session.
* Synchronise your `pane`. You need to run exactly the same command in three different remote servers? Open three `panes`, synchronise them with one command, and everything you type in the first will be copied in the others.
* Many more things I don't even know about yet.

Do I need to say that everything is manageable with your keyboard? You can use your mouse also, which is useful when you learn how to use it.

With [tmuxp](https://wiki.archlinux.org/index.php/Tmuxp), you can even go further to automate your `tmux` sessions. Indeed, you can write a [configuration file](https://tmuxp.git-pull.com/en/latest/examples.html) to open the `windows` and `panes` you want, and automatically launching applications in them.

Let say that in order for you to work on your new cool project (which will make you rich) you need to:

* Run `docker compose` in a `pane`.
* Run `npm run dev` inside one of your docker container in another `pane`.
* Open a ssh connection to your production server in a different `window`.

`tmuxp` allows you to automate all of that with one command line and a simple configuration file.

I wrote [another article about tmux](https://thevaluable.dev/tmux-boost-productivity-terminal/) which explains the basic configuration you need to get started. You'll learn as well everything to customize it for your needs.

## An IDE Which Fits You

This IDE is [Neovim](https://neovim.io/), an incredible fork of [Vim](https://www.vim.org/), coupled with the shell. Since Neovim and Vim are very similar, I'll continue speaking about both of them using the word "Vim".

![neovim](https://thevaluable.dev/images/2018/env/env_04.png)
*This article was written in Neovim*

Are you afraid? Don't run away yet! Let me explain why you should really try to rethink everything you know about Vim.

I already [write about Vim multiple time](https://thevaluable.dev/tags/vim/), so I'll only summarize here why it's great:

* Coding with Vim is *fun*.
* Vim let you leverage the power of your keyboard. Yep. Again.
* Vanilla Vim has a lot of functionalities. You always learn something new.
* Vim has a very good community maintaining *many* plugins. They should cover 99% of your needs. In any language: JavaScript, Golang, PHP, Clojure, you name it.
* You are not restricted to any language. You want to code in `Rust`, `Go` and `C` with the same editor, with autocompletion, syntax highlighting and all these good stuff? Vim is perfect for that.
* Everything is highly configurable. Forget bloated preferences; with Vim you can fine tune anything you want.
* No more notifications appearing out of nowhere to break your flow (I look at you, Intellij IDEs).
* Instead of having an IDE full of stuff you will never use, you can build your own only for your own workflow.
* It's fast.
* It's free.

Still suspicious? The best way to find out if I'm totally crazy is to try it. As you might expect, I wrote [this article](https://thevaluable.dev/vim-for-beginnners/) for this exact purpose.

## Making Git Even Better: tig and diff-so-fancy

![tig](https://thevaluable.dev/images/2018/env/env_06.png)
*tig: on top the branch hierarchy, on the bottom you can see every change made*

![diff-so-fancy](https://thevaluable.dev/images/2018/env/env_07.png)
*diff-so-fancy is very nice to see quickly everything you modified*

I think `git` is very easy to use in the shell for the most common tasks we all do every day. The decisions made about the user experience are a bit weird sometimes, but it's better to be aware of them from the beginning on.

Basically, you need on a daily basis to use:

* `git push`
* `git pull`
* `git branch`
* `git checkout`
* `git merge`
* `git rebase`
* `git diff`

Do you really need a whole GUI for that?

The first tool I use with Git is [tig](https://jonas.github.io/tig/). It allows you to go through the hierarchy of git branches and display the details of each commit.

The second one is `git-so-fancy`. It displays `git diff` in a very readable way in your terminal. I always use it to verify what I did before doing a commit.

These tools are both available in the official `Arch Linux` repositories.

## Better CLI for MySQL and PostgreSQL

If you need a quick and practical interface in the shell to interact with your database, I would recommend [mycli](https://www.mycli.net/) for `mysql` and [pgcli](https://www.pgcli.com/) for `PostgreSql`.

These tools are similar `MySQL` and `PostgreSql` CLIs, but on steroids:

* It auto complete databases, tables, joins, and so on.
* You can use snippets for the boring operations you do all the time.

In order to install them on `Arch Linux` you'll need to fetch them from the `AUR`.

Do I surprise you if I tell you that I wrote a [whole article how to install and use efficiently mycli](https://thevaluable.dev/mysql-command-line-tool-mycli/)?

## Are You Ready To Be A Mouseless Developer?

![linux shell](https://thevaluable.dev/images/2018/env/feel_at_home.jpg)

Productivity, versatility, efficiency, control, and comfort: they are the main reasons why I've chosen to build and configure my entire development environment. A couple of months ago (June 2020), I decided to write a whole book explaining step by step how to build a [mouseless development environment](https://themouseless.dev). It changed my life, as a developer, and I would love to pass on the knowledge I've got from this experience.

Don't listen to people who never tried `Vim` saying that it's the most complicated thing on Earth. Don't listen to them arguing that `Arch Linux` will crash even more than Windows 95. I used both intensively; I'm sure they didn't.

This kind of environment asks for a bit of time and efforts to setup and understand. A couple of weeks. Then, you'll have your **own** development environment, tailored for your present and future needs. You'll feel in control. You'll feel at home.

![mouseless development environment](https://thevaluable.dev/images/2018/env/mouseless_development_environment_780.png)
[Mega HD version](https://thevaluable.dev/images/2018/env/mouseless_development_environment.png)