Skip to content

Commit b915637

Browse files
committed
Added additional information in the README regarding multiple browser key bindings.
1 parent bad52cf commit b915637

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

README.md

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Sublime Text - View In Browser
22

33
*<a href="http://adampresley.github.io/sublime-view-in-browser/">View In Browser</a>* is a Sublime Text plugin that will open whatever is in your
4-
current view/tab. If the file current open is new and has not been saved a temporary
5-
file is created (in your default temp directory for your OS) with the extension of
4+
current view/tab. If the file current open is new and has not been saved a temporary
5+
file is created (in your default temp directory for your OS) with the extension of
66
**.htm** and your browser will open it. However if the current open file is saved
77
and has a name this plugin will open it in whatever you have set to handle
88
its type.
@@ -24,7 +24,30 @@ you can use and configure are in the key named **supportedBrowsers**.
2424
The **supportedBrowsers** values can be configured to have paths to your browser installations.
2525
Each browser listed is an array (list) of configurations that allow you to setup a browser
2626
for multiple operating systems. For example under *chrome* there are two configurations.
27-
The first is for your average Linux system. The second is for Windows.
27+
The first is for your average Linux system. The second is for Windows.
28+
29+
## Other Browsers
30+
View In Browser also provides key bindings to open your current view in browser other than
31+
your **selectedBrowser**. Below is a listing of the keys and what browser open with
32+
those key bindings.
33+
34+
* *CTRL + ALT + F* - Firefox
35+
* *CTRL + ALT + C* - Chrome
36+
* *CTRL + ALT + I* - Internet Explorer
37+
* *CTRL + ALT + S* - Safari
38+
39+
Like any other key binding in Sublime these can be changed. Below is an example of the
40+
key configuration. You can remap these in your User key bindings configuration file.
41+
42+
```javascript
43+
[
44+
{ "keys": [ "ctrl+alt+v" ], "command": "view_in_browser" },
45+
{ "keys": [ "ctrl+alt+f" ], "command": "view_in_browser", "args": { "browser": "firefox" } },
46+
{ "keys": [ "ctrl+alt+c" ], "command": "view_in_browser", "args": { "browser": "chrome" } },
47+
{ "keys": [ "ctrl+alt+i" ], "command": "view_in_browser", "args": { "browser": "iexplore" } },
48+
{ "keys": [ "ctrl+alt+s" ], "command": "view_in_browser", "args": { "browser": "safari" } }
49+
]
50+
```
2851

2952
### Windows Considerations
3053
One of the things you may notice in the Windows configuration for *chrome* is a variable in
@@ -45,20 +68,20 @@ Here is a list of supported variables:
4568
* **My Music** - Path to your music ___location
4669

4770
Note that many of these are not terribly useful for determining browser ___location, unless you
48-
have decided to install Firefox in your My Music folder.
71+
have decided to install Firefox in your My Music folder.
4972

5073

5174
## Configure to View on Local Server
5275
The View In Browser plugin also supports the ability to view files in the context of
5376
a local server. So if you have a local Apache, Tomcat, or some other server application running
54-
you can configure this plugin to open your file prefixed with a URL.
77+
you can configure this plugin to open your file prefixed with a URL.
5578

5679
To configure this the View In Browser plugin reads the configuration of your currently
5780
loaded project. You can edit a project file by opening the *sublime-project* file
58-
by choosing **Project** -> **Edit Project**. In your project file you will need to specify
81+
by choosing **Project** -> **Edit Project**. In your project file you will need to specify
5982
two things:
6083

61-
* **baseUrl** - The root URL to prefix files with
84+
* **baseUrl** - The root URL to prefix files with
6285
* **basePath** - The base path where your site/application lives
6386

6487
Here's how that looks.
@@ -95,18 +118,18 @@ of the FILE protocol.
95118
* Backslashes in Windows are now converted to forward slashes when using
96119
a local server configuration. Closes <a href="https://github.com/adampresley/sublime-view-in-browser/issues/16">#16</a>
97120
* 04/16/2013:
98-
* Added support for muliple paths per browser configuration (jadient
121+
* Added support for muliple paths per browser configuration (jadient
99122
<a href="https://github.com/adampresley/sublime-view-in-browser/pull/14">#14</a>)
100123
* 03/08/2013:
101124
* Avoid loading Windows special folder references when on a Mac
102125
* Added Mac Chrome to the supported browsers list
103126
* 02/18/2013:
104-
* Added ability to use Windows special folder references to browser commands. Closes
127+
* Added ability to use Windows special folder references to browser commands. Closes
105128
<a href="https://github.com/adampresley/sublime-view-in-browser/issues/10">#10</a>
106129
* 01/30/2013:
107130
* All settings for this plugin now live in the file **View In Browser.sublime-settings**.
108-
This allows for a user to override them in their *User* directory. The old
109-
**settings.json** file is no longer used.
131+
This allows for a user to override them in their *User* directory. The old
132+
**settings.json** file is no longer used.
110133
* 01/28/2013:
111134
* Merged in change from imaginationac to remove menu nesting
112135
* 12/26/2012:
@@ -134,13 +157,13 @@ of the FILE protocol.
134157
The MIT License (MIT)
135158
Copyright (c) 2012 Adam Presley
136159

137-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
138-
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
160+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
161+
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
139162
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
140163

141164
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
142165

143-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
144-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
145-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
166+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
168+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
146169
IN THE SOFTWARE.

0 commit comments

Comments
 (0)