Skip to content

Instantly share code, notes, and snippets.

@Hazer
Last active November 17, 2024 04:45
Show Gist options
  • Select an option

  • Save Hazer/d5c0c2fb65ec5891d61a010fe7724b95 to your computer and use it in GitHub Desktop.

Select an option

Save Hazer/d5c0c2fb65ec5891d61a010fe7724b95 to your computer and use it in GitHub Desktop.
Set default editor macOS
# Zed
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=dev.zed.Zed;}'
# Sublime Text 4
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.4;}'
# Sublime Text 3
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
# VS Code
defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.microsoft.VSCode;}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment