ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Open In Browser

by vicke4 ST3 Trending

Sublime Text 3 plugin to open hyper links in browsers.

Details

Installs

  • Total 4K
  • Win 3K
  • OS X 857
  • Linux 360
Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10
Windows 4 11 17 20 18 22 20 14 8 7 13 12 7 13 9 8 6 10 14 11 13 10 5 13 12 10 8 7 10 7 11 8 11 8 8 10 7 5 10 7 8 9 10 7 12 8
OS X 0 2 2 2 9 3 2 1 6 0 5 1 2 1 5 1 4 3 2 3 1 4 4 2 4 1 7 3 4 2 0 3 5 8 2 1 2 3 4 2 3 2 2 5 3 2
Linux 2 1 0 3 2 1 1 0 3 2 3 2 4 0 2 1 0 0 0 0 2 0 0 2 1 0 1 3 1 0 1 1 2 1 2 2 2 1 1 2 0 2 5 2 2 0

Readme

Source
raw.​githubusercontent.​com

open_in_browser

Sublime Text 3 plugin to display a link when you hover over a hyperlink. On click of the link your default browser will open the link (Of course you can customise the behaviour ).

open-in-browser-sublime3-plugin

Installation

You can download this plugin from Package Control. Inside Sublime press ctrl + shift + p (Mac users press cmd + shift + p). Type install package and press enter. Then type open in browser. Select the one with spaces. Press enter. That's it.

Customization

So, this plugin opens the default browser while you click on links. Yet, We can specify which browser must be used to open links. Navigate to Preferences -> Package Settings -> Open in Browser -> Settings or press ctrl + shift + p (Mac users press cmd + shift + p) and select Preferences: Open in Browser Settings. You'll see two JSON files. One on the left is Default settings and the other is User settings. Default settings will be like the one below.

{
    "enable": true,         // Set enable to false to disable this plugin
    "custom_browser": "",   // Set a default browser to open links
    "only_on_hover": false  // Make this true to get links beside URLs only on hover
}

You can disable the plugin by adding "enable": false on User settings.

You can set the default browser to open links by adding custom_browser as key and corresponding browser as value (Refer below).

If only_on_hover is true, links will be displayed only when you hover over it.

Mac

Enter the browser's name as you'd see in Applications window.

Eg: Google Chrome, Firefox

Linux

Here, you've to provide executable name. Mostly, you'll be able to find it in /usr/bin

Eg: google-chrome, firefox

Windows

The name with .exe extension. You can find in C:\Program Files\<app name>\*.exe

Eg: chrome, firefox

Known Issues

  • On Mac OS Sierra, though the default browser may be Chrome or Safari, If Firefox is installed, it opens the URLs all the time. We can change this behaviour (Read customization section above).

Improvements

  • More Regex can be added to detect links & file paths. Feel free to make Pull requests.