Created
October 14, 2024 07:01
-
-
Save channprj/cc71cf47b96c3e9bc195c48d64718287 to your computer and use it in GitHub Desktop.
Use VS Code by default code editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install duti python-yq | |
curl "https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml" \ | |
| yq -r "to_entries | (map(.value.extensions) | flatten) - [null] | unique | .[]" \ | |
| xargs -L 1 -I "{}" duti -s com.microsoft.VSCode {} all | |
# Use duti to set defaults for specific files to VSCode | |
duti -s com.microsoft.VSCode public.plain-text all | |
duti -s com.microsoft.VSCode public.source-code all | |
duti -s com.microsoft.VSCode public.data all | |
duti -s com.microsoft.VSCode .css all | |
duti -s com.microsoft.VSCode .gitattributes all | |
duti -s com.microsoft.VSCode .gitignore all | |
duti -s com.microsoft.VSCode .htaccess all | |
duti -s com.microsoft.VSCode .js all | |
duti -s com.microsoft.VSCode .json all | |
duti -s com.microsoft.VSCode .link all | |
duti -s com.microsoft.VSCode .md all | |
duti -s com.microsoft.VSCode .mv all | |
duti -s com.microsoft.VSCode .mvt all | |
duti -s com.microsoft.VSCode .scss all | |
duti -s com.microsoft.VSCode .sh all | |
duti -s com.microsoft.VSCode .txt all | |
duti -s com.microsoft.VSCode .xml all | |
duti -s com.microsoft.VSCode .yaml all | |
duti -s com.microsoft.VSCode .zsh all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: https://stackoverflow.com/a/70402997/5254829