moretension / duti

A command-line tool to select default applications for document types and URL schemes on Mac OS X
Other
1.41k stars 66 forks source link

Set default for .gitignore? #40

Open gandalfsaxe opened 4 years ago

gandalfsaxe commented 4 years ago

I tried; duti -s com.microsoft.VSCode gitignore all duti -s com.microsoft.VSCode public.unix-executable all

but it still opens .gitignore in TextEdit. Any suggestions?

sonOfRa commented 4 years ago

Not sure which of the three did it for me (because I set them all in one go), but for me, .gitignore files are now opened with sublime text:

❯ duti -s com.sublimetext.3 public.plain-text all
❯ duti -s com.sublimetext.3 public.unix-executable all
❯ duti -s com.sublimetext.3 public.data all

Obviously, replace sublime text with VSCode for your use case.

randy commented 3 years ago

I was looking for an answer to this as well, seeing the response from @sonOfRa, and having already tried plain-text, I did them one at a time and killed Finder from Activity Monitor after each. It's definitely data... Hopefully associating TextMate with unix-executable doesn't break anything! 😂

gandalfsaxe commented 2 years ago

@sonOfRa Thanks! FYI at was this that fixed it:

duti -s com.sublimetext.3 public.plain-text all