A guide to getting your Mac ready for web development — recommending tools, shortcuts, tips and tricks, and more
I recently switched jobs, and during the first few days on the new job, I had to setup a MacBook with all the tools required for me to do my job, web development. Although, I’ve used Macs for a long time, at my previous job I was developing on a PC with Windows 10. It was surprisingly pleasant and productive once I got WSL up and running, but I’m really glad to have a Mac as my primary workstation once again.
Every now and then, I look for guides like this one to see what tools people are using and to get productivity tips. And almost always I learn about something new that makes my life as a developer easier. I’ve kept notes of all the things I installed and configured during the first weeks on the new job hoping it’d be useful to other developers.
Table of Contents
- macOS Settings
- System preferences
- Finder
- Screenshot
- macOS Shortcuts
- Command-line Tools
- Homebrew
- iTerm2
- Git
- Zsh
- Oh My Zsh
- Node.js
- tldr
- tree
- htop
- fzf
- ripgrep
- path-extractor
- MacOS Applications
- Visual Studio Code
- Rectangle
- GIMP
- LICEcap
- Numi
- Tips and Tricks
macOS Settings
Let’s start with a few changes you can make to macOS and the built-in apps.
System preferences
Keyboard
Keyboard > T️️ouch Bar Shows: F1, F2, etc. Keys
Keyboard> Press Fn key to: Show Control Strip
These two settings are about the touch bar. As a developer, I find myself using the F keys more often (a lot of shortcuts rely on them) than the other options — thus I prefer to have them be the default.
Dock
️️☑️ Automatically hide and show the Dock
More often than not, I use Spotlight (⌘ Space) or the terminal to launch applications instead of the dock — it’s hard to justify dedicating such display real estate to it. Besides, you can easily access it by moving your mouse to the bottom of the screen or by pressing ⌃ F3.
Trackpad
Point & Click > ️️☑️ Tap to click
Once you get used to it, it’s way faster to tap instead of click.
Accessibility
Pointer Control > Mouse & Trackpad > Trackpad Options… > ️️☑️ Enable dragging
View options
View > Show Path Bar
View > Show Status Bar
Show hidden files
Type defaults write com.apple.Finder AppleShowAllFiles true
in terminal,
or press ⇧⌘ .
Screenshot
There was a time when capturing screenshots was not very intuitive. You can still memorize those shortcuts if you want, but I recommend using the Screenshot app, — just open Spotlight and type Screenshot
or press ⇧⌘ 5.
Change where screenshots are saved
Options > Save to
macOS Shortcuts
These are some the mac shortcuts I use the most (I won’t list the very basic ones like ⌘ C, ⌘ V, ⌘ Tab, etc.). For a more comprehensive list, click here.
System wide
Spotlight search: ⌘ Space
Character Viewer: ⌃⌘ Space (Quickly find emojis and special characters)
Force quit an app: ⌥⌘ Esc
Screenshot: ⇧⌘ 5
Lock screen: ⌃⌘ Q
Show or hide the Dock: ⌃ F3 or ⌥⌘ D
Show all windows: ⌃ Arrow-Up
Show all windows of the front app: ⌃ Arrow-Down
Forward delete: fn delete
Paste without formatting: ⇧⌘ V
Finder
Open the home folder: ⇧⌘ H
Open the desktop folder. ⇧⌘ D
Open the parent folder: ⌘ Arrow-Up
Go to the previous folder: ⌘ [
Go to the next folder: ⌘ ]
Show or hide hidden files: ⇧⌘ .
Command-line Tools
Now to the fun part. These are the command line–related tools I recommend for any web developer.
Homebrew
It’s the package manager. It allows you to install, uninstall, and update command-line tools and Mac applications.
To install it, open the terminal, and run this command:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”
During the installation, you might be asked to install the Xcode Command Line Tools if you haven’t already. Just follow the instructions on the screen.
To make sure your system is ready to brew, run brew doctor
.
You can now search for packages with brew search
and install them with brew install
(for command-line tools) and brew cask install
(for macOS applications).
You can list installed packages with brew list
and brew cask list
.
To update the packages’ local registry you can run brew update
, and to upgrade the installed packages to their latest versions, type brew upgrade
.
I recommend running brew doctor
every now and then to make sure things are good and brew cleanup
to remove unused files.
iTerm2
It’s a replacement for the terminal. It offers a lot of features that are really useful. I’ll list my favorite ones below.
To install it, open the terminal (this is the last time you’ll need it), and run:
brew cask install iterm2
Now, feel free to replace terminal from the Dock (if you have it) with iTerm2. Or just open Spotlight and type iTerm2.
Hotkey window
You can show or hide the iTerm2 window via a hotkey from anywhere very quickly.
Preferences > Keys > Hotkey > ☑️ Show/hide all windows with a system-wide hotkey
I recommend using ⌘ ` as the hotkey.
Unixyness
Copy on selection, paste on middle click, and focus follow the mouse.
Preferences > General > Selection > ☑️ Copy to pasteboard on selection
Preferences > Pointer > General > ☑️ Three-finger tap emulates middle click
Preferences > General > Pointer > ☑️ Focus follows mouse
Disable native full screen
By disabling native full screen, you can quickly make iTerm2 take the whole screen without the usual full-screen animation.
Preferences > General > Window > ☐ Native full screen windows
Shortcut for full screen: ⌥ Return
Split panes
You can divide up your tabs into multiple panes with separate sessions and quickly switch between them. This works very nicely with focus-follow mouse.
Right Click > Split Pane Vertically
Right Click > Split Pane Horizontally
I recommend creating new key bindings for those actions:Preferences > Keys > Key Binding > +
I use ⌥ v and ⌥ h.
Shell integration
You can enable better integration between your shell and iTerm2.
iTerm2 > Install Shell Integration
Then, add the following to your .zshrc
(more details about Zsh can be found in the next sections): source ~/.iterm2_shell_integration.zsh
.
See the docs for more information.
Profile settings
Feel free to explore these settings and configure your profile to your liking. I recommend experimenting with background opacity and blur.
Git
The most popular version-control system. You should install it with Homebrew before continuing:
brew install git.
Visual Studio Code supports Git (and several other VCSs via extensions). But if you want to take your Git via CLI to the next level, I recommend forgit.
If you want better diffs, check out Delta.
Zsh
As macOS’s default shell since Catalina, Zsh is built on top of Bash and provides a lot of cool features.
The first thing I recommend is having Homebrew manage its installation — open iTerm2, and run:
brew install zsh.
To update our default shell to be Homebrew’s Zsh, we need to edit the shell’s whitelist: sudo vim /etc/shells
. (If you’re not comfortable with Vim, you can use TextEdit instead by running sudo open /etc/shells
.)
Add a new line with /usr/local/bin/zsh
, save, and close.
To change the default shell, run: chsh -s /usr/local/bin/zsh
.
Restart the terminal, and confirm we’re on the correct Zsh by running:echo $SHELL
. You should see /usr/local/bin/zsh
.
Now, we have access to many features. My favorites are:
Tab completion
gre<TAB>
: As soon as you press Tab right after gre
, Zsh will show you all the available commands that start with gre
. If you press Tab again, you’ll be able to navigate between the options by pressing Tab or the Left and Right arrows. Confirm the command you want by pressing Space or Return.
cd <TAB>
: Zsh also completes file and folder names. And it’s smart enough if you type just a substring: cd ~/w/p/s<TAB>
expands to cd ~/workspace/project/src
.
Globbing (aka filename generation)
List only folders in the current directory: ls *(/)
List only folders in the current directory and its subdirectories: ls **/*(/)
Remove all .DS_Store
files recursively: rm -rf **/.DS_Store
. (If you want to be sure which files will be deleted, you can press Tab before running the command, and Zsh will expand the pattern)
There are lots of qualifiers you can use to target files with specific attributes. You can enable the more complex ones by running setopt extended_glob
.
Here’s one command to recursively match all normal files that have no uppercase characters or numbers in the name. They’re executable for the owner but not for the rest of the world. The owner must have the UID 1002, the file size must be above 30MB, and it must have been modified within the last month: ls -l **/([^A-Z[:digit:]])##(#q.x^X^u1002Lm+30mM-1)
Credits to Janek Bevendorff.
You can find other useful tips here.
Oh My Zsh
Regardless of its odd name, Oh My Zsh is a community-driven framework for managing your Zsh configuration. It provides hundreds of plugins and themes and makes configuring Zsh a breeze.
To install Oh My Zsh, run:
sh -c “$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
We can configure Zsh by running vim ~/.zshrc
or (open ~/.zshrc
if you prefer TextEdit over Vim). You’ll see a lot of configurations added by Oh My Zsh that you can play with. If you ever need to reset your .zshrc
, you can find the template here.
I’ll list my recommendations below, but I highly recommend you browse the available themes and plugins later.
Theme
Powerlevel10k is my theme of choice — it’s fast, it’s really well integrated with Git, it supports icons, and
It has a really nice wizard that walks you through configuring it the first time that you run it:
I highly recommend enabling Transient Prompt.
To install it with Homebrew, run:
brew install romkatv/powerlevel10k/powerlevel10k
And add the following line to your .zshrc
:source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme
It’ll override any value you have set $ZSH_THEME
to.
Restart iTerm2, and you should see the configuration wizard. In the future, you can run it again with p10k configure
.
About Fellow Consulting
Fellow Consulting AG, based in Poing near Munich, has been advising clients on digitizing their business processes for more than 10 years.
We know how our customers can implement their digital vision. Together with our partners infor_ Amazon AWS, Microsoft Azure, SugarCRM, and Ephesoft, we bring the mission of digitalization to life.
We act as an operational and strategic specialist for our clients as well as a sparring partner for the everyday challenges of digital transformation.