Skip to content

Commit

Permalink
Add User settings
Browse files Browse the repository at this point in the history
  • Loading branch information
vicke4 committed Nov 21, 2017
1 parent 9a53486 commit 7f5ba05
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 10 additions & 1 deletion Default.sublime-commands
Original file line number Diff line number Diff line change
@@ -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"}
}
]
13 changes: 11 additions & 2 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
}
]
}
]
Expand Down
2 changes: 2 additions & 0 deletions OpenInBrowser.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Default settings of Open In Browser

{
// Set enable to false to disable this plugin
"enable": true,
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
{
Expand All @@ -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.

Expand Down

0 comments on commit 7f5ba05

Please sign in to comment.