diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b85dd..29c5ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.2.7] - 2017-11-22 +### Added +- User level settings. + ## [1.2.6] - 2017-11-18 ### Changed - Getting phantom icon from a function. diff --git a/Default.sublime-commands b/Default.sublime-commands index bc6ebfa..b292718 100644 --- a/Default.sublime-commands +++ b/Default.sublime-commands @@ -1,7 +1,16 @@ [ { "caption": "Preferences: Open in Browser Settings", + "command": "edit_settings", + "args": + { + "base_file": "${packages}/Open In Browser/OpenInBrowser.sublime-settings", + "default": "// Open In Browser Settings - User\n{\n\t$0\n}\n" + } + }, + { + "caption": "Open in Browser: Guide", "command": "open_file", - "args": {"file": "${packages}/Open In Browser/OpenInBrowser.sublime-settings"} + "args": {"file": "${packages}/Open In Browser/README.md"} } ] diff --git a/Main.sublime-menu b/Main.sublime-menu index 5a045aa..cbbccda 100644 --- a/Main.sublime-menu +++ b/Main.sublime-menu @@ -17,9 +17,18 @@ [ { "caption": "Settings", - "command": "open_file", - "args": {"file": "${packages}/Open In Browser/OpenInBrowser.sublime-settings"} + "command": "edit_settings", + "args": + { + "base_file": "${packages}/Open In Browser/OpenInBrowser.sublime-settings", + "default": "// Open In Browser Settings - User\n{\n\t$0\n}\n" + } }, + { + "caption": "Guide", + "command": "open_file", + "args": {"file": "${packages}/Open In Browser/README.md"} + } ] } ] diff --git a/OpenInBrowser.sublime-settings b/OpenInBrowser.sublime-settings index 1224b89..ac2d7d5 100644 --- a/OpenInBrowser.sublime-settings +++ b/OpenInBrowser.sublime-settings @@ -1,3 +1,5 @@ +// Default settings of Open In Browser + { // Set enable to false to disable this plugin "enable": true, diff --git a/README.md b/README.md index ed96cbd..a6e3838 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ You can download this plugin from [Package Control](https://packagecontrol.io). 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. +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. ``` { @@ -19,9 +19,9 @@ So, this plugin opens the default browser while you click on links. Yet, We can "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 disable the plugin by adding `"enable": false` on User settings. -You can set the default browser to open links by setting value to `custom_browser` (Refer below). +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.