Khaled Romdhane

My development setup

As someone who tries to optimize every part of my daily routine, I have found a setup that helps me get stuff done daily as a software engineer.


Zsh

Website: https://www.zsh.org/
Zsh comes pre-installed with MacOS. You can install it through your favorite package manager if you don’t have it (https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH).


Oh my Zsh

Website: https://ohmyz.sh/
Oh my Zsh is an open-source framework for managing your Zsh configuration and comes with various features such as customizable themes, plugins, and autocomplete. They help me save time by avoiding typing long git commands.
To enable them, you need to edit your .zshrc:

plugins=(git ssh-agent zsh-z)

I also make sure to have aliases for everything I repeatedly do. Here are some examples:

## SSH aliases
alias karinessh="ssh-add -D && ssh-add -K ~/.ssh/khaled-karine-so"
alias arowndssh="ssh-add -D && ssh-add -K ~/.ssh/khaled-arownd-me"
alias ivassh="ssh-add -D && ssh-add -K ~/.ssh/khaled-iva-docs"

## Source zsh
alias sz="source ~/.zshrc"

I also love automatically running nvm use and yarn when I open a terminal:

if test -f "./.nvmrc"; then
    echo ".nvmrc found! running nvm use"
    nvm use
fi

if test -f "./yarn.lock"; then
    echo "yarn.lock found! running yarn"
    yarn
fi

The Z plugin allows you to jump to folders by name instead of typing the full path:

## Without Z
cd Desktop/work/karine.so
## With Z
z karine.so
## Granted you have to open it once with Z first.

And for the git plugin these are the main commands I use:

ga . # git add .
gcam "Message" # git commit -m "Message"
ggp # git push origin current_branch
ggl # git pull origin current_branch
gco branch # git checkout branch

Fig

Website: https://fig.io.
Fig is a command-line tool that’s too powerful for me to explain. I recommend checking it directly on their website. I mainly use it for autocomplete. It feels much smoother than the Zsh autocomplete.


NVM

Website: https://github.com/nvm-sh/nvm
NVM is a tool that I use to manage my Node.js installations. It allows me to switch between different versions of Node.js easily, making it easier for me to work on projects requiring different runtime versions. I make sure that the default version running is always the latest.


Tmux

Website: https://github.com/tmux/tmux/wiki
Tmux stands for Terminal Multiplexer. With Tmux, I can easily create multiple panes and windows, switch between them, and attach and detach sessions.
Tmux makes it easier for me to work on multiple projects simultaneously without switching between different terminal windows. It’s essential when considering I use Neovim as my editor of choice.


Neovim

Website: https://neovim.io/
Neovim, or NVim, my code editor. I switched last year from VScode for multiple reasons that deserve their article. It is a Vim editor fork with more features and a flourishing ecosystem. The main plugin I fell in love with and one of the main reasons I switched in the first place is telescope.nvim. More on that in my next blog post.


If you enjoyed reading this article, I invite you to check out my “My Mac Setup” post for more details on how I set up my Mac. Stay tuned for my next post on “My SaaS Launch Checklist” where I’ll share my process. Thank you for reading, and I hope that this article has been helpful to you!

First published on romdhane.blog (Ghost), 2023, at https://www.romdhane.blog/my-dev-setup/. This page is its permanent home.