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

Open In Browser

by vicke4 ST3 New

Sublime Text 3 plugin to open hyper links in browsers.

Details

Installs

  • Total 122
  • Win 85
  • OS X 21
  • Linux 16
Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5
Windows 9 9 20 12 16 16 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 1 3 5 2 2 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 3 4 3 3 6 5 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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. You'll see a JSON file 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 setting enable to false.

You can set the default browser to open links by setting value to custom_browser (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.