How I setup my Mac for coding

lisi_linhart

Lisi Linhart

Posted on March 11, 2023

How I setup my Mac for coding

This post was originally posted on my blog

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: My browser of choice at the moment

  • VSCode: I love VSCode with some specific extensions

  • Spotify: Coding is better with some good music to stay focused and productive.

  • iTerm: 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: Great autocompletion and writing the code you need through comments

  • GitLens: I love seeing all the Git information I need directly in the editor

  • Volar: Since I work a lot with Vue these days, I tend to use some helpers specifically for Vue.

  • Markdown All in One: I write lots of markdown, so these helpers make it easier to type

Installing brew

Homebrew, 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)"
Enter fullscreen mode Exit fullscreen mode

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: Node Version Manager (nvm) is a tool that allows you to easily switch between different versions of Node.js. brew install nvm

  • rbenv: Ruby Version Manager (rbenv) is a tool that allows you to easily switch between different versions of Ruby. brew install rbenv

  • gh: 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: 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: 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, add the following line to your .zshrc file, here are some I use:

plugins=(git alias history) 
Enter fullscreen mode Exit fullscreen mode

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

alias alias_name='command_to_run'
Enter fullscreen mode Exit fullscreen mode

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!

💖 💪 🙅 🚩
lisi_linhart
Lisi Linhart

Posted on March 11, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related