Sublime Text from Command Line

前端 未结 27 2231
时光说笑
时光说笑 2020-11-27 08:37

I installed Sublime Text and wanted to know how to open rb files in it from the terminal. I saw What is the command to make Sublime Text my core editor? and I s

27条回答
  •  误落风尘
    2020-11-27 09:41

    Another idea would be to include C:\Program Files\Sublime Text 2\ in your PATH, and then run an administrator command prompt:

    cd "C:\Program Files\Sublime Text 2\"
    mklink sublime.exe sublime_text.exe
    

    That will make a symbolic link with the new name. And now you can use it freely:

    sublime hello.txt
    

    Update: After having a chance to use this trick and update Sublime Text 2, I'm happy to say that updating to a new build doesn't affect the symbolic link.

提交回复
热议问题