Sublime Text-open the current file in the browser

Source: Internet
Author: User

Sublime Text-open the current file in the browser

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

Miss DreamweaverF12?

In fact, Sublime can also achieve this effect without installing any plug-ins.

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

 

By default, Sublime provides a JSON section:

{ "cmd": ["make"] }


Change the JSON format:

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


I am running Sublime on windows and add the chrome Path to the Path.
That is to say, this JSON is actually a command, if it is OS X:

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


SaveChrome. sublime-buildAnd restart Sublime.
You will find that one more item under the Build System MenuChrome, Select this item.

Return to the edited file and pressF7OrCtrl+B.

For more information about Sublime Text, see:

Ubuntu installation code editor Sublime Text 3 (Build 3083)

Animation display 16 Sublime Text Shortcut Key Usage

Ubuntu 12.10 install and crack Sublime Text 2

Install Sublime Text 2 on Ubuntu 13.04

Code artifact-Sublime Text package management tools and extensions

How to Develop the Sublime Text 2 plug-in

Install and crack the Sublime Text 2 editor in Windows Mac Linux

Text Editor Sublime Text User Experience

Sublime Text details: click here
Sublime Text: click here

This article permanently updates the link address:

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.