Shortcut in the editor that allows you to open HTML in the Browser

0

I'm studying html and javascript , I wonder if there is any way inside the sublime that by pressing for example f12, directly from a browser. No need to save the file and click on it in the directory and ask to open as.

    
asked by anonymous 24.02.2018 / 01:24

1 answer

1

You can use link

    In the sublimetext open the Package Control (use the shortcut Ctrl + Shift + P )

  • Then select Install Package

  • After this type View in Browser

Once installed open a html document and hit Ctrl + Alt + V , it will open the document in your main browser. >

Configuring multiple browsers

To configure multiple browsers go to the following menu: Preferences > Key Bindings

Then edit the document for something like this:

[
    { "keys": [ "ctrl+alt+v" ], "command": "view_in_browser" },
    { "keys": [ "ctrl+alt+f" ], "command": "view_in_browser", "args": { "browser": "firefox" } },
    { "keys": [ "ctrl+alt+c" ], "command": "view_in_browser", "args": { "browser": "chrome" } },
    { "keys": [ "ctrl+alt+i" ], "command": "view_in_browser", "args": { "browser": "iexplore" } },
    { "keys": [ "ctrl+alt+s" ], "command": "view_in_browser", "args": { "browser": "safari" } }
]

Of course, in order to work you will need to have the browsers installed, so you can configure the browsers you want.

    
24.02.2018 / 03:34