Mac Config
Some developer-oriented things for Mac.
Last updated
Some developer-oriented things for Mac.
Last updated
Alfred -
Like Spotlight, but WAY better
Free option is way better than Spotlight
Paid option is ridiculously powerful, somewhat expensive at $31 year/$57 lifetime
Well worth it. Seriously just get the lifetime license
Workflows can change your life and are relatively easy to build
Literally the first thing I install on new machines
Amethyst -
Tilling window manager, sorta comparable to Spectacles
Most might find Spectacles more friendly:
Hotkeys to switch between layouts, throw windows to spaces/screens, etc
Has a learning curve, but IMO really nice once you get it down
Vanilla -
Put menubar icons inside a little popout
Free, but the $5 “pro” version is worth it (allows hiding, start on login, etc)
There are other options for this but this one is sooooo dead simple
f.lux -
Beats the pants off nightshift and it’s free
Amphetamine -
Keep mac awake
Has triggers IE “when connected to bluetooth” “when powered” etc
Great for long-running scripts
CheatSheet -
Hold the cmd button to show all keyboard shortcuts for app
Pretty handy
If you also get CustomShortcuts like mentioned on the page you can overwrite hotkeys easily
I don’t use this, personally
Rocket -
Allows usage of Slack-style emojis via typing :
Able to enable/disable per app
Totally optional but I’ve found it somewhat nice
Bear Notes -
Markdown compatible native (fast!) macOS note app
Supports extensive tagging, exporting in various formats, etc
Free version is totally fine
Paid version would be good if you have iOS devices or multiple macs
Must-have app, IMO
BetterTouchTool -
Customize the TouchBar extensively
Can do other things with keyboard shortcuts, gestures, trackpad, etc
I haven’t played with these yet
45 day free trial, then it’s $7 for a 2 year license or $20 for a lifetime
Personally still on trial but I don’t see how I’m NOT going to buy a license
Backblaze -
Back up your dot files, settings, personal files, etc
$6/mo or $60/year per computer (transferrable if you get a new computer)
Ignore node_modules and .git
Bitwarden -
Password manager, open source. What else do you need
Oh yeah it’s free for personal use
Also works for secure notes, CCs, etc
ungoogled-chromium -
Chromium without calling to Google, ever
Also has a bunch of extra privacy settings
No reason to run Chrome any more
Dark Reader extension -
Browser extension that overwrites page CSS to give just about anything a dark mode
Configurable down to a per-domain basis
Beats Stylish IMO because it works everywhere
Open source
Linkclump extension -
Use a hotkey (configurable) to drag a box and open all links in said box
Smart and configurable
Open source
itsycal -
Menu bar calendar
Can be used to replace system clock (I did!)
Just handy in general
LuLu -
Free and open source version of Little Snitch, essentially
Notifies you on an app attempting a connection to the internet
Tells you what it’s connecting to, so you can allow updates but not analytics
Allows permanent or temporary white and black listing
I’m never surprised when someone doesn’t know some hotkeys. Here’s some hotkeys Legend ⌘
= the command key ⇧
= the shift key ⌥
= alt/option ^
- the control key
Screenshots
⌘ + ^ + 4
- Take a screenshot of a selectable section of the screen and save the file on your desktop
Add in ⇧ Shift
and it is copied to clipboard and not saved to desktop
⌘ + ^ + 3
- Take a screenshot of ALL displays (each monitor saved as a different file)
Add in ⇧ Shift
and it is copied to clipboard and not saved to desktop
⌘ + ^ + 5
- Advanced screenshotting. Too bulky for my tastes
General
⌘ + ,
- This goes to app settings in MOST apps
⌘ + ;
- A lot of JetBrainz apps use this as well (DataGrip etc)
⌘ + W
OR Middle click
a tab will close it in most apps (Finder, Chrome, etc)
⌘ + W
will close the current window if there are not multiple tabs
⌘ + ⇧ + ]
OR ⌘ + ⌥ + Right
- cycle to the next tab
⌘ + ⇧ + [
OR ⌘ + ⌥ + Left
- cycle to the previous tab\
⌘ + ⇧ + .
- show/hide hidden files in finder
⌘ + Up
- go “up” a directory in finder
Chrome (and most other browsers?)
⌘ + ⌥ + I
- open the developer tools
⌘ + T
- new tab
⌘ + ⇧ + T
- reopen closed tab (repeatable)
⌘ + W
- new window
⌘ + ⇧ + W
- reopen closed window (repeatable)
⌘ + L
- highlight the URL bar
⌘ + Up
- top of page
⌘ + Down
- bottom of page
⌘ + Back
- go back a page
⌘ + Forward
- go forward a page
⌘ + ⇧ + ]
- cycle to the next tab
⌘ + ⇧ + [
- cycle to the previous tab
Sublime, VSC, most IDEs
^ + M
- jump to matching bracket
⌘ + ⇧ + D
- duplicate current line
⌘ + ⇧ + L
- place cursor at end of line for every line selected
⌥ + Up/Down
OR⌘ + ^ + Up/Down
- move selection up/down (single or multi-line)
⌘ + Shift + F
- search across all files in project
^ + Backtick
- Open integrated terminal
⌘ + \
- Show/hide side bar (I think this is editor split by default)
Even if you have a favorite IDE, Sublime is suuuuuuper fast for quick viewing of big JSON files etc. Things you wouldn’t have in a project and want something more than nano or textedit to work with JSON Pretty
extension is incredibly handy and very fast
If you don’t use VSC, skip this section.
settings.json
settings.json is incredibly powerful.
A lot of settings can only be set via editing this file. To find it, hit
⌘+⇧ Shift+P
to bring up the command palette and type in “settings” and select “Preferences: Open Settings (JSON)” Intellisense works wonders in the settings file, just start typing the name of an extension or whatever and it’ll start listing possible properties. When you select one, it usually automatically shows possible values for that setting.settings.json supports JS comments
//
and/* */
Here’s some fun excerpts from my settings.json
Extensions
I’ve curated a decent array of extensions in a few years of using VSC. Some of these come with VSC by default, but I don’t remember which ones so I’ll point ‘em out anyway.
GitLens
Just an absolutely amazing all in one Git extension
Inline git blame, anyone?
All kinds of diffing
Seriously it could replace all the other git extensions
JSON Tools
Minify or prettify JSON. That’s it. That’s all.
LintLens
Inline and hover info on eslint rules
Monokai Pro Themes
Best themes I’ve personally found
Is a “paid” thing but just has a nag popup on first open of VSC to close
npm intellisense
Auto-completion of package names etc from npm install
’d packages
works with require() and import syntax
I recommend adding ”npm-intellisense.scanDevDependencies”: true
to your settings.json
Quokka.js
Does some cool things with running JS live as you edit
Can be handy while hacking together scripts
Free version is somewhat limited, but not enough I’ve even considered paying
Rainbow CSV
Text in CSVs opened in VSC is color coded by column
Select Line Status Bar
Shows number of selected lines in status bar
TODO Highlight
Highlight things like TODO
NOTE
FIXME
etc
Can add any arbitrary string to highlight
Super customizable
Can’t live without
Todo Tree
Adds a tree view of TODO etc comments
As customizable as TODO Highlights
Bracket Pair Colorizer
Colors brackets different colors to make it easy to identify matching brackets.
Has options to show colorized lines indicating scope as well
There is a Bracket Pair Colorizer 2 that’s supposed to be faster but I can’t get it to work
On large files takes about a second to colorize everything, so some people might not love it
Here’s my settings that work quite well for me
iTerm2 - https://iterm2.com/
We all know this one, but how can we make it better?
!!! I assume you’re using zsh instead of bash. If using bash, there’s probably still ways to do all this stuff, you’ll just have to find them on your own.
Adds in some nice quality of life things, especially for remote hosts
Totally optional, I honestly mostly don’t use the features, just command autocomplete from history on remote hosts
ESSENTIAL. SET THIS UP. It will literally change your life
Profiles
Can be setup to automatically connect to SSH, run commands, etc on open
Can be given hotkeys
Under Advanced -> Triggers you can do a lot with auto entry of passwords or key presses based on regex parsing of the terminal (tip:
\n
acts as hitting ENTER)Badges
See above docs, they’re great and can be quite powerful
nano
I use nano
over vi
because I prefer not to torture myself. If you prefer vi
go ahead and skip this section.
First thing to do is update the nano version on your mac
Run brew install nano
Grab the path brew installed to from the install messages. If you don’t see it, run brew info nano
As of right now, this path is /usr/local/Cellar/nano/4.9.3
- newer versions, just change the path
add an alias to your bashrc/zshrc alias nano=/usr/local/Cellar/nano/4.9.3/bin/nano
Reload your terminal and now you’re using the new nano when you run nano
Syntax highlighting in nano is nice
run echo "include ~/.nano/*.nanorc" >> ~/.nanorc
Now you have syntax highlighting
git
git ls
will show a nice compact list view of commits in current repo
git rh1
is scary and I never use it, but could be useful to some
git ac "commit message"
will add all untracked files in current repo and add a commit message
you can add additional -m “next line"
to add more lines, but they will have an extra linebreak
Alternatively, commit messages respect \n
for new lines so you can do git ac “Commit title\nfirst additional line\nsecond additional line"
git undo-commit
is also scary and I never use it, but you might like it
git new branch_name
creates a new branch with branch_name IE git new feature/PSI-9999
git mergetest
allows you to dry run a merge attempt to see if there are any conflicts
CLI tools
setup directory aliases and quickly jump to them goto work
goto aem63
etc
I mostly just like typing goto work
nodejs version manager
commands like n 12
to switch to nodejs 12 or n run 8 index.js
to run a file with nodejs 8
I just find it a little friendlier than nvm
Don’t use much python, but every time I do versions are an issue. This is a MUST HAVE
Seriously you’ll eventually find a tool or something that needs python 3.6 and you have 2.7 or vice versa
Like top
but way better
Colorful, customizable, mouse support (in iTerm)
Like man pages but for people. Shows usage for whatever you search
tldr n
- shows a few ways you’re likely to use n
I honestly haven’t used man
or googled CLI usage very much since I started using this
zsh
Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, etc
If you prefer not to use oh-my-zsh, you can probably still get most of the same functionality, but some things from my ~/.zshrc
are going to require tweaking as they rely on it.
Fun bits from my ~/.zshrc
I personally use the Atom keymap in VSC, so some of these hotkeys might be different from what you use 🤷♂️ That said, most IDEs provide a printable cheat sheet, here’s VSC’s:
zsh/iterm integration -
Hotkey window -
Can be auto-switched based on all kinds of stuff;
This is especially cool if you add a Badge to the profile:
Word jump (use option + back/forward to jump between words like your IDE):
Just follow installation instructions here -
Handy aliases from my ~/.gitconfig
- also check out
goto - - brew install goto
n - - brew install n
pyenv - - brew install pyenv
htop - - brew install htop
tldr - - brew install tldr
First, I highly recommend oh-my-zsh
-
One thing not mentioned in my zshrc is zsh-manydots-magic - - this just does intelligent parsing and expansion of dot usage in commands like cd ...
which is the equivalent of cd ../..
- it can follow a lot more dots than that, too. Very handy.