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 setup in Sublime Text for web development is appreciated!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not really sure this question is approprate here, but you can add a new “Build System” under
Tools -> Build System -> New Build System...As with all configuration in Sublime Text its just JSON, so it should be pretty straight forward. The main thing you are going to want to configure is the
"cmd"key/val. Here is the build config for launching chrome on my mac.Save that as
Chrome.sublime-build, relaunch Sublime Text and you should see a newChromeoption in the build list. Select it, and then you should be able to launch Chrome with Cmd+B on a Mac (or whatever hotkey you have configured for build, maybe its F7 or Ctrl+B on a Windows machine)At least this should give you a push in the right direction.
Edit:
Another thing I end up doing a lot in Sublime Text 2 is if you right click inside a document, one of the items in the context menu is
Copy File Path, which puts the current file’s full path into the clipboard for easy pasting into whatever browser you want.Sublime Text 3
(linux example)
“shell_cmd”: “google-chrome ‘$file'”