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

后端 未结 8 1388
-上瘾入骨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:47

    For OS X and Sublime Text

    Make subl available.

    Put this in ~/.bash_profile

    [[ -s ~/.bashrc ]] && source ~/.bashrc
    

    Put this in ~/.bashrc

    export EDITOR=subl
    

提交回复
热议问题