-
Notifications
You must be signed in to change notification settings - Fork 0
setup
This guide shows how I set up and customise a new Mac for coding, as well as some Windows equivalents.
Display and Dock:
Under Settings > Desktop and Dock:
- Move the dock to the left hand side and hide it automatically
- Turn off "Automatically rearrange Spaces based on most recent use"
- Turn off "Click wallpaper to show desktop"
Controls:
- Activate keyboard navigation on MacOS
- Turn off predictive typing: Settings > Keyboard > Input Sources > Edit
- Increase trackpad speed and select "tap to click": Settings > Trackpad
Chrome/Edge:
- Turn off "Show warning before quitting with ⌘Q"
- Turn on notifications for email / chat / calendars:
- within Gmail / Outlook
- within the browser settings
- for the browser within the operating system settings
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 projectsto create a projects folder -
cd projectsto 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:
- XCode Command Line Developer Tools - essential for computery things. One way to do this is
git --version(which prompts you to install the tool) orxcode-select --install. This may take some time to download and install. - Homebrew - to help you install other things
Follow the Git setup instructions on the git page.
brew install rbenv-
rbenv install -lto 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
If things don't work, then a combination of the following might help:
bundle installbundle update- restart Terminal
- reinstall Ruby
(For example, Middleman uses Node)
brew install node
The right way to install Python on a Mac
brew install pyenv pyenv-virtualenv
pyenv install x.x.xYou 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).
For example, you might want to type be instead of bundle exec:
- open .zshrc
- add, for example,
alias be='bundle exec' - restart terminal
- Set Finder to show folders at top of window (Finder > Settings > Advanced)
- Set up tabbing for accessibility testing
- 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 --versionto 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
chocolateywhich is similar to Homebrew on Mac.