Skip to content

Instantly share code, notes, and snippets.

@sifu
Created November 11, 2010 10:20
Show Gist options
  • Save sifu/672305 to your computer and use it in GitHub Desktop.
Save sifu/672305 to your computer and use it in GitHub Desktop.
save file; focus last chrome window; reload the current page;
nmap <F10> :wall<Cr>:silent execute "!xdotool search Chrome windowfocus --sync key --clearmodifiers ctrl+r" <Cr> <C-l>
@sifu
Copy link
Author

sifu commented Nov 11, 2010

only works on linux and requires xdotool to be installed

@wazum
Copy link

wazum commented Nov 11, 2010

create a shell script: /usr/local/bin/update_chrome
#!/bin/sh
/usr/bin/osascript << EOF
tell application "Google Chrome"
activate
tell application "System Events" to keystroke "r" using command down
end tell
EOF
exit

and then
nmap :wall:silent execute "!update_chrome"
--> works with vim in the shell and MacVim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment