Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
" 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
You can’t perform that action at this time.