Skip to content
Andrew Hick edited this page Aug 11, 2025 · 12 revisions

This guide shows how I set up and customise a new Mac for coding, as well as some Windows equivalents.

Initial installs

Start installing Visual Studio Code.

Open Terminal and:

  • set preferred theme (I use Ocean)
  • make the window size larger, for example, 120 x 48
  • set the profile to open on restart
  • go to your home directory and create a .zshrc file: touch .zshrc (you'll use this later to customise Terminal)
  • mkdir projects to create a projects folder
  • cd projects to enter the directory

In general, with Terminal, if you've installed or reconfigured something, you'll often need to restart Terminal for the changes to take effect.

Then install more tools. Each one might take some time:

  • Command Line Developer Tools - essential for computery things. One way to do this is git --version (which prompts you to install the tool) or xcode-select --install
  • Homebrew - to help you install other things
  • Git: brew install git

Set up Git

Read Alan Cruikshanks' Git setup guide and:

  • set user name
  • set email address as the no-reply one

Create or clone the repo you're going to work with. For example, go to projects and git clone https://github.com/andrewhick/reference.git

On first push you'll need to set up authentication using a personal access token:

  • set up your personal access token
  • cache your personal access token in your keychain

More information about working with Git

If you're working with Ruby

  • brew install rbenv
  • rbenv install -l to get a list of latest stable versions. If the version you want isn't there, then run brew upgrade ruby-build.rbenv
  • rbenv install 3.3.0 (or whatever the latest version is)
  • rbenv global 3.3.0 (set the global default version)
  • add eval "$(rbenv init - zsh)" to .zshrc
  • restart Terminal
  • gem install bundler - installs the thing that helps you install things
  • bundle install - installs all the things you need for your current repository, based on your repository's Gemfile.lock file

Ruby troubleshooting

If things don't work, then a combination of the following might help:

  • bundle install
  • bundle update
  • restart Terminal
  • reinstall Ruby

If you're working with Node

(For example, Middleman uses Node)

  • brew install node

If you're working with Python

The right way to install Python on a Mac

brew install pyenv pyenv-virtualenv
pyenv install x.x.x

Customise VS Code

You can either edit Settings using the user interface or a JSON file. To edit the JSON file, open settings and look for then look for an icon in the top right (curled arrow pointing at document) which opens the custom settings.json file.

I use the following:

{
    "editor.tabSize": 2,
    "editor.scrollBeyondLastLine": false,
    "editor.wordWrap": "on",
    "explorer.confirmDelete": false,
    "files.autoSave": "afterDelay",
    "files.enableTrash": false,
    "editor.selectionHighlight": true,
    "editor.occurrencesHighlight": "off", // stops similar words being highlighted on click
    "update.showReleaseNotes": false,
    "workbench.colorCustomizations": {
        "editorBracketMatch.background": "#00ff",
        "editorBracketMatch.border": "#00ff",
        "editor.selectionBackground": "#26cf", // makes the current selection more prominent
        "editor.selectionHighlightBackground": "#000e", // less prominent formatting for words similar to those selected
        "editor.selectionHighlightBorder": "#ccfc" // less prominent formatting for words similar to those selected
    },
    "workbench.colorTheme": "Tomorrow Night Blue",
    "workbench.editor.tabSizing": "shrink",
    "workbench.iconTheme": "vscode-icons" // requires extension
}

Extensions you might want to install:

  • language interpreters for the languages you're working with
  • vscode-icons: adds nice icons.

Also it might be useful to run Code from the shell (command line): https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line (needed for interactive commands like rebase).

To make shortcuts in Terminal

For example, you might want to type be instead of bundle exec:

  • open .zshrc
  • add, for example, alias be='bundle exec'
  • restart terminal

Other general things

  • Set Finder to show folders at top of window (Finder > Settings > Advanced)
  • Set up tabbing for accessibility testing

Windows equivalents

  • install / update VS Code
  • open command prompt (start, cmd) or PowerShell
  • set preferred layout - in cmd, right click title bar and select Properties
  • try git --version to see if Git is installed or needs updating
  • install Ruby via RubyInstaller (the MSYS2 addon is useful to help install things)
  • install Node.js. This includes installing chocolatey which is similar to Homebrew on Mac.

Clone this wiki locally