Sublime Text from Command Line

前端 未结 27 2158
时光说笑
时光说笑 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:43

    I wanted to start a new instance of Sublime Text from the command-line.. The following page helped me, even though it only says OSX: http://www.sublimetext.com/docs/3/osx_command_line.html.

    So, I use a batch file in my user path to launch 'sublime'. Here is basically what I use (**the batch file contents):

    @start "sublime" "%~dp0Sublime Text\sublime_text.exe" --new-window %*
    

    (my batch file %~-dp0 is located one folder above the Sublime Text installation path.)

    I know this is an old thread, but I thought I'd add what I was looking for (and found). It might help someone else!

提交回复
热议问题