Sublime Text 2 keyboard shortcut to open file in specified browser (e.g. Chrome)

后端 未结 14 2150
野性不改
野性不改 2020-12-02 04:31

I do web development and am trying out Sublime Text 2. Is there a keyboard shortcut to open the current file in specified browser (e.g. Chrome)?

Any help to get set

14条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 04:36

    Tools -> Build System -> New Build System. The type following as your OS, save as Chrome.sublime-build

    Windows OS

      {
            "cmd": ["C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", "$file"]
      }
    

    MAC Os

    {
       "cmd": ["open", "-a", "/Applications/Google Chrome.app", "$file"]
    }
    

    Save the file - Chrome.sublime-build in location

    C:\Users\xnivirro\Downloads\Software-Installed\Sublime-2\Data\Packages\User
    

    Sublime View in Browswer - https://github.com/adampresley/sublime-view-in-browser (Tried with Linux and it works)

提交回复
热议问题