Skip to content

Commit ab127d7

Browse files
author
Giovanni Collazo
committed
Initial Commit
0 parents  commit ab127d7

4 files changed

+40
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
*.pyc

BrowserRefresh.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import sublime_plugin
2+
from subprocess import call
3+
4+
5+
class BrowserRefreshCommand(sublime_plugin.WindowCommand):
6+
def run(self):
7+
browser_command = """
8+
tell application "Google Chrome" to tell the active tab of its first window
9+
reload
10+
end tell
11+
tell application "Google Chrome" to activate
12+
"""
13+
call(['osascript', '-e', browser_command])

Default (OSX).sublime-keymap

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{
3+
"keys": ["command+shift+r"], "command": "browser_refresh"
4+
}
5+
]

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#Browser Refresh for Sublime Text 2
2+
3+
After installing this plugin you can hit `command + shift + r` on any window in **Sublime Text 2** and you **Google Chrome** window will come to the foreground and reload the active tab.
4+
5+
##Requrements
6+
Currenty it only works on **Mac OS X** with **Google Chrome**. I don't really plan to extend it for now. If you want to make it better, please feel free to fork and request a pull.
7+
8+
##How to install
9+
Just clone this repo to your **Packages** folder
10+
11+
##License
12+
All of Browser Refresh for Sublime Text 2 is licensed under the MIT license.
13+
14+
Copyright (c) 2012 Giovanni Collazo
15+
16+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 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:
17+
18+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
19+
20+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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 IN THE SOFTWARE.

0 commit comments

Comments
 (0)