Sublime Text-Open the current file in the browser

Source: Internet
Author: User

Is there a way to open the current file in the specified browser via the shortcut key?

A little nostalgic for Dreamweaver F12 ?

In fact, sublime can also achieve this effect, and do not need to install any plug-ins.

EnterTools -> Build System -> New Build System...

Sublime gives a JSON by default:

{ "cmd": ["make"] }


Change this JSON to:

{ "cmd": ["chrome", "$file"] }


I am a sublime running on Windows and add the path of chrome to path.
In other words, this JSON is actually a command, if OS X:

{ "cmd": ["open", "-a", "Google Chrome", "$file"] }


Save As chrome.sublime-build and restart sublime.
You will find one more item under the Build System menu Chrome , select the item.

Back to the edited file, press F7 or Ctrl +, that's it B .

Sublime Text-Open the current file in the browser

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.