Skip to content

Instantly share code, notes, and snippets.

@reganjohnson
Last active March 19, 2018 14:21
Show Gist options
  • Save reganjohnson/1f6d93c4e3d09e4d5903 to your computer and use it in GitHub Desktop.
Save reganjohnson/1f6d93c4e3d09e4d5903 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