Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save canering/d4e56a5162e17a28b6890839dc216462 to your computer and use it in GitHub Desktop.
Save canering/d4e56a5162e17a28b6890839dc216462 to your computer and use it in GitHub Desktop.
Set Default Text Editor as Sublime 3
First, let's create the $ subl command
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Another option is to use duti (http://duti.org / https://github.com/moretension/duti).
Run brew install duti, save a file like this as ~/.duti:
com.sublimetext.3 public.plain-text all
com.sublimetext.3 public.unix-executable all
Then run /usr/local/bin/duti ~/.duti
# Set Sublime as Defautl for Git
git config --global core.editor "subl -n -w"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment