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

Open In Browser

by vicke4 ST3

Sublime Text 3 plugin to open hyper links in browsers.

Details

  • 1.2.7
  • github.​com
  • github.​com
  • 7 months ago
  • 37 minutes ago
  • 7 months ago

Installs

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

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.