Created
September 5, 2013 15:13
-
-
Save jondkinney/6451509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Reload Google Chrome on Mac from Vim. | |
" Adapted from: https://github.com/gcollazo/BrowserRefresh-Sublime/ | |
function! ChromeReload() | |
python << EOF | |
from subprocess import call | |
browser = """ | |
tell application "Google Chrome" to tell the active tab of its first window | |
reload | |
end tell | |
""" | |
call(['osascript', '-e', browser]) | |
EOF | |
endfunction | |
" reload current top window/tab of chrome | |
map <leader>r :call ChromeReload()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment