Skip to content

Instantly share code, notes, and snippets.

@jondkinney
Created September 5, 2013 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jondkinney/6451490 to your computer and use it in GitHub Desktop.
Save jondkinney/6451490 to your computer and use it in GitHub Desktop.
" 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