Permalink
Browse files

Merge pull request #2 from guersam/patch-1

Added chromium support
  • Loading branch information...
2 parents ab04960 + dce9f25 commit 8db19df6d8af4ae6a6e680e43d735fd2cb774b51 @lordm committed Apr 8, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 plugin/browser-reload-linux.vim
@@ -16,7 +16,7 @@ function! s:ReloadBrowser(browser)
let l:currentWindow = substitute(system('xdotool getactivewindow'), "\n", "", "")
let l:activateCommand = " windowactivate "
- if ( a:browser == "Chrome")
+ if ( a:browser == "Chrome" || a:browser == "Chromium-browser" )
let l:activateCommand = ""
endif
exec "silent ! xdotool search --onlyvisible --class " . a:browser . l:activateCommand . " key --clearmodifiers ctrl+r"
@@ -31,6 +31,11 @@ command! -bar ChromeReload call s:ReloadBrowser("Chrome")
command! -bar ChromeReloadStart ChromeReloadStop | autocmd BufWritePost <buffer> ChromeReload
command! -bar ChromeReloadStop autocmd! BufWritePost <buffer>
+" Chromium
+command! -bar ChromiumReload call s:ReloadBrowser("Chromium-browser")
+command! -bar ChromiumReloadStart ChromiumReloadStop | autocmd BufWritePost <buffer> ChromiumReload
+command! -bar ChromiumReloadStop autocmd! BufWritePost <buffer>
+
" Firefox
command! -bar FirefoxReload call s:ReloadBrowser("Firefox")
command! -bar FirefoxReloadStart FirefoxReloadStop | autocmd BufWritePost <buffer> FirefoxReload
@@ -42,6 +47,6 @@ command! -bar OperaReloadStart OperaReloadStop | autocmd BufWritePost <buffer> O
command! -bar OperaReloadStop autocmd! BufWritePost <buffer>
" All Browsers
-command! -bar AllBrowserReload silent OperaReload | FirefoxReload | ChromeReload
+command! -bar AllBrowserReload silent OperaReload | FirefoxReload | ChromeReload | ChromiumReload
command! -bar AllBrowserReloadStart AllBrowserReloadStop | autocmd BufWritePost <buffer> AllBrowserReload
command! -bar AllBrowserReloadStop autocmd! BufWritePost <buffer>

0 comments on commit 8db19df

Please sign in to comment.