---
title: "My developer workflow using WSL, tmux, and VSCode"
author: "Christian Bager Bach Houmann"
date: 2022-11-08
description: "The tools and workflows I use for software development on Windows."
tags: ["Technology"]
url: "https://bagerbach.com/blog/developer-workflow-on-windows-using-wsl-tmux-and-vscode/"
---

# My developer workflow using WSL, tmux, and VSCode

![Windows Terminal](/uploads/terminal-dev-post.png)

[WSL](https://docs.microsoft.com/en-us/windows/wsl/) has made development on Windows machines much better.
Especially with the release of WSL 2 it is now easier and faster than ever.

This post documents my workflows and tools for software development on Windows.
I will update it whenever I find a better way to do something.

I use the Ubuntu distribution for WSL. This is also the OS I use (or derivations thereof: PopOS) when I'm on Linux.

**For configuration of the mentioned tools, look at my [dotfiles](https://github.com/chhoumann/dotfiles).**
Love finding new tools? Check out my [tool stack](/tools/)!

## Terminal

[Windows Terminal](https://github.com/microsoft/terminal) is a non-negotiable for me. I have not found a better terminal emulator for Windows.
It has tabs, great customizability, and it's pretty powerful.

Recently, I have been exploring [Warp Terminal](https://www.warp.dev). You have to run it through WSL (currently: no Windows build), which isn't as nice as running it natively.
It's a great terminal emulator and has a lot of features that makes the experience more powerful and enjoyable.
I could point to individual features, but what makes Warp great is how all features combined makes it feel. It's just good.

I use a [Nerd Font](https://www.nerdfonts.com) called Caskaydia Cove Mono in the terminal.
I switch between the Campbell and One Half Dark themes.

## Shell

I use Z Shell, aka. `zsh`.

Managing zsh can get kind of trivial, so like [Oh My Zsh](https://ohmyz.sh) has been essential to my workflow.
It makes [configuration](https://github.com/chhoumann/dotfiles/blob/master/zshrc) and plugin management easy.

### Prompt

I was a huge fan of Powerlevel10k for Zsh, but moved to [Starship](https://starship.rs) because it has a clean and minimal default look.
Starship is very easy to set up and provides a nice developer experience in my opinion.

## CLI tools

I use an array of CLI tools to make me more effective. Here's a rapid-fire list:

-   [Lazygit](https://github.com/jesseduffield/lazygit) for accelerated git workflow
    -   [git-delta](https://github.com/dandavison/delta) for nicer git diffs in lazygit. Also check out [difftastic](https://github.com/Wilfred/difftastic)
    -   [cz-cli (commitizen)](https://github.com/commitizen/cz-cli) to use when creating [conventional commits](https://www.conventionalcommits.org/). Very helpful when using [semantic-release](https://github.com/semantic-release/semantic-release). Great CI solution when working on NPM packages or [Obsidian](https://obsidian.md) plugins
-   [Eza](https://github.com/eza-community/eza) as a better `ls` replacement
-   [gh (GitHub CLI)](https://cli.github.com) for faster GitHub workflow
-   [tmux](https://github.com/tmux/tmux) for awesome multi-tasking in the terminal, or the Rust-based [zellij](https://github.com/zellij-org/zellij)
-   [nvm](https://github.com/nvm-sh/nvm) to manage node versions
-   Multiple Zsh plugins (see below)
-   [Lazydocker](https://github.com/jesseduffield/lazydocker) for accelerated docker workflow
-   [Brew](https://brew.sh) for package management
-   [Act](https://github.com/nektos/act) for running GitHub Actions locally. Save yourself the painful embarrasment of pushing \*\* commits and waiting for CI to fail while you're figuring out how to do X and Y in your CI
-   [Ni](https://github.com/antfu/ni) so I don't have to care whether I'm in a Yarn / NPM / pnpm project
-   [btop](https://github.com/aristocratos/btop) as a better top
-   [Rye](https://github.com/astral-sh/rye) as a project and package manager for Python. If you use Python, this is a must have. Use with [uv](https://github.com/astral-sh/uv) and [ruff](https://github.com/astral-sh/ruff)
-   [Tectonic](https://github.com/tectonic-typesetting/tectonic) for typesetting. Stop bothering with LaTeX build tools...
-   [Zoxide](https://github.com/ajeetdsouza/zoxide) as a faster way to navigate directories
-   [bat](https://github.com/sharkdp/bat) as a better cat
-   [ripgrep](https://github.com/BurntSushi/ripgrep) as a faster grep
-   [fd](https://github.com/sharkdp/fd) as a faster find
-   [fzf](https://github.com/junegunn/fzf) as a fuzzy finder
-   [csvlens](https://github.com/YS-L/csvlens) to work with CSVs (also see [visidata](https://www.visidata.org))
-   [Topgrade-rs](https://github.com/topgrade-rs/topgrade) to upgrade all the things

### Lazygit

This is my favorite way of interacting with git. My git capabilities and speed has probably 10x'ed after I started using it.

I have configured my Lazygit to work with [git-delta](https://dandavison.github.io/delta/introduction.html) and [commitizen](https://commitizen.github.io/cz-cli/).

Jesse Duffield, the creator of Lazygit, made a great [video showcasing 15 features in 15 minutes](https://www.youtube.com/watch?v=CPLdltN7wgE). I highly recommend that you watch it to see how it might accelerate your workflow.

I even made a tool called [**bunnai**](https://github.com/chhoumann/bunnai) for having ai write commit messages for me in lazygit. It's been very useful!

**Git-delta** is a great tool for visualizing changes.

**Commitizen** helps me write [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), which is makes it easier to manage versions with [semantic release](https://github.com/semantic-release/semantic-release) when creating either node packages, Obsidian plugins, and other software where it makes sense to use that kind of versioning.

-   **Install Lazygit:** [GitHub - jesseduffield/lazygit: simple terminal UI for git commands](https://github.com/jesseduffield/lazygit#ubuntu)
-   **Install git-delta:** Use [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) and do `cargo install git-delta`.
-   **Install commitizen:** Use a node version manager to install node and do `npm install -g commitizen`.

### Eza

Great replacement for `ls`.

I use a few aliases here:

```bash
alias ls="eza --icons --git"
alias l='eza -alg --color=always --group-directories-first --git'
alias ll='eza -aliSgh --color=always --group-directories-first --icons --header --long --git'
alias lt='eza -@alT --color=always --git'
alias llt="eza --oneline --tree --icons --git-ignore"
alias lr='eza -alg --sort=modified --color=always --group-directories-first --git'
```

To install, use [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) and do `cargo install eza`.

### GitHub CLI

I mainly use this to create and configure repos.
Often also do `gh repo view --web` to open the repo in my browser.

-   `gh repo create` to create a new repo. `--private` to make it private.
-   `gh repo view --web` to open the repo in the browser.
-   `gh repo clone <repo>` to clone a repo, e.g. `gh repo clone chhoumann/dotfiles`. No need to prepend your own username to the repo name (given you own the repo).
-   `gh pr merge -d` to merge the PR for the branch you are in and delete the branch.

One of my most time-saving combinations comes into play when I'm initializing a new repository.

```bash
# Make project folder and cd in
mkdir project1 && cd project1
# Initialize new git repository
git init

# Many project-starters like `npx create-next-app@latest` will create a folder for you
# And sometimes even init a git repo. That's why the command below is great.

# Create a new GitHub repository and push local repo up
gh repo create project1 --private --source=. --remote=upstream

# Alternatively, if you just want gh to create an empty repo and clone it to a folder:
gh repo create project1 --private --clone
```

### Tmux

I'm still learning tmux, but even the basics have accelerated my workflow.

Creating and killing panes, splitting panes, and switching between them is very fast and easy.

This seriously helps when, e.g. you are running `npm run dev` in one pane, but need to commit something.
You don't want to stop the dev server, so you just split the pane and commit in the new pane.

### nvm

I basically just do `nvm alias default lts/gallium` (current LTS version). This sets the default node version.

`nvm use --lts` or `nvm install --lts` is very helpful.

Sometimes you want to play around with other versions (e.g. latest or previous), so it helps with that as well.

### Zsh plugins

I'm using the following plugins:

-   [git](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git) adds nice git aliases, but I prefer Lazygit now
-   [zsh-z](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/z) so you can jump around directories much faster
-   [gh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gh) adds completion for the gh cli
-   [rust](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rust) adds completion for the rust compiler, rustup, and cargo
-   [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) adds autosuggestions
-   [tmux](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/tmux) adds QoL features for using zsh & tmux together.

If you choose nothing else, I highly recommend `zsh-z`. It's a game changer.
You can CD into a directory from anywhere by just writing part of it.

For example, `z dot` takes me to my dotfiles folder, no matter where I am.
It learns from your usage, so it gets better over time.

## Editor

I have been using [Visual Studio Code](https://code.visualstudio.com) as my editor for a long time.

Recently, I have been moving towards using [Cursor](https://cursor.sh), which is VSCode, but completely integrated with AI. Given how much LLMs empower my workflows, this has been a great change. No switching to ChatGPT to ask questions and then back to VSCode. Just ask directly in Cursor. Copilot++ in Cursor is fantastic as well.

I've dabbled in [Neovim](https://neovim.io), but decided I'd rather spend my time doing other things than tweaking my Neovim config.
I have a tendency to fall into rabbit holes, especially ones that look like shiny new tools.

Using VS Code is a good way to get a lot of functionality without having to spend a lot of time configuring it.
This also makes setup much easier when switching computers.

I do have some settings and keybindings that I prefer. You can find those in my [dotfiles](https://github.com/chhoumann/dotfiles).

### Extensions

I use the following extensions:

-   [Vim](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim), because I find it greatly improves my efficiency.
-   [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens), because it makes it easier to spot errors. Can lead to clutter, though.
-   [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) is a serious productivity game-changer, especially when using frameworks or languages you aren't used to.
-   [Tailwind CSS Intellisense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) is great for working with Tailwind CSS.
-   [Import Cost](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost) is great for spotting when you are importing too much.
-   [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) in combination with...
-   [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for formatting.
-   [ES7+ React/Redux/GraphQL/React-Native snippets](https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets), mostly for React snippets.
-   [vscode-icons](https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons) for nice icons.
-   [WSL](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) for working in VS Code through WSL.
-   [GitHub Pull Requests and Issues](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) for working with GitHub PRs and issues. Great in combination with the `gh` CLI tool.

And language specific extensions for the languages I use.

I use [GitHub Dark](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme) as my primary theme. I've also taken a liking to [poimandres](https://marketplace.visualstudio.com/items?itemName=pmndrs.pmndrs) and [poimandres-alternate](https://marketplace.visualstudio.com/items?itemName=DanielPriestley.poimandres-alternate).
