How I setup my Mac for coding
Tags: webdev, programming, productivity
Published: 2023-03-11 13:50:00

This post was originally posted on [my blog](https://lisilinhart.info/posts/how-i-setup-my-mac)


As a developer, setting up your machine for coding can be a time-consuming process. However, taking the time to properly configure your tools and environment can greatly improve your productivity and make coding a more enjoyable experience. In this blog post, I'll walk you through the steps I take to set up my macOS machine for coding. So, let's get started!

## Installing Applications

First I install my essential applications that will be useful for coding. Here are the applications I use on a daily basis: 

* [Brave](https://brave.com/download/): My browser of choice at the moment 

* [VSCode](https://code.visualstudio.com/download): I love VSCode with some specific extensions 

* [Spotify](https://www.spotify.com/download/mac/): Coding is better with some good music to stay focused and productive. 

* [iTerm](https://iterm2.com): I've been using this terminal for years and my favourite feature is the hotkey overlay outside of the IDE.

## VSCode extensions 

One of the great things about VSCode is the wide range of extensions available that can help you customize your coding environment to suit your needs. Here are a few extensions that I love: 

* [Github CoPilot](https://github.com/features/copilot): Great autocompletion and writing the code you need through comments 

* [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens): I love seeing all the Git information I need directly in the editor 

* [Volar](https://github.com/vuejs/language-tools): Since I work a lot with Vue these days, I tend to use some helpers specifically for Vue. 

* [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one): I write lots of markdown, so these helpers make it easier to type

## Installing brew 

[Homebrew](https://brew.sh/), also known as `brew`, is a popular package manager for macOS that makes it easy to install and manage software packages. I'll use brew to install several packages that are essential for coding environments. 

Here's how to install brew:

```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

## Installing brew packages 

Now that we have brew installed, we can use it to install machine packages. Here are a few packages I recommend installing: 

* [nvm](https://github.com/nvm-sh/nvm): Node Version Manager (nvm) is a tool that allows you to easily switch between different versions of Node.js. brew install nvm 

* [rbenv](https://github.com/rbenv/rbenv): Ruby Version Manager (rbenv) is a tool that allows you to easily switch between different versions of Ruby. brew install rbenv 

* [gh](https://cli.github.com/): GitHub CLI (gh) is a command-line interface for GitHub that allows you to perform many GitHub operations from your terminal. brew install gh 

* [zsh](https://formulae.brew.sh/formula/zsh): Zsh is an alternative shell to the default bash shell that comes with macOS, it provides additional features and customization options brew install zsh 

* [oh-my-zsh](https://ohmyz.sh/): Oh My Zsh is a popular framework for managing your Zsh configuration. It comes with a variety of plugins, themes, and customization options that can help you be more productive while coding. sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

## Configuring Oh My Zsh 

You can customize your Zsh configuration by editing the `.zshrc` file, which is located in your home directory: nano ~/.zshrc To enable the [oh my zsh plugins](https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins), add the following line to your `.zshrc` file, here are some I use: 

```
plugins=(git alias history) 
```

To create custom aliases, add the following line to your `.zshrc` file: 

```
alias alias_name='command_to_run'
```

## Conclusion 

With essential applications, extensions, and packages like VSCode, Git Lense, Iterm, Brew, NVM, RBenv, GH, and Oh My Zsh, I have everything I need to code in the environment I enjoy. The beauty of a customized development environments is that you can tailor it to your specific needs and preferences. With a little bit of tinkering, you'll be coding like a pro in no time!