Change the default editor for files opened in the terminal? (e.g. set it to TextEdit/Coda/Textmate)

后端 未结 8 1399
-上瘾入骨i
-上瘾入骨i 2020-12-22 17:00

Is there a way to make files opened for editing in the terminal open in Textedit instead?

For example, where a command might open a file for editing (like git

8条回答
  •  一向
    一向 (楼主)
    2020-12-22 17:34

    For Sublime Text 3:

    defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
    

    See Set TextMate as the default text editor on Mac OS X for details.

提交回复
热议问题