I\'d like to be able to send the HTML file I\'m currently editing in vim
to my web browser, Chrome. I\'m running Linux.
This gets me very close:
For windows7 x64, - F2 to open current file, - F3 to lookup current cword under cursor.
for g:chrome_exe in [
\'C:\Progra~2\Google\Chrome\Application\chrome.exe',
\'C:\Progra~1\Google\Chrome\Application\chrome.exe',
\'C:\Progra~1\Google\Chrome\Applic~1\chrome.exe',
\'C:\Users\'.$USERNAME.'\AppData\Local\Google\Chrome\Application\chrome.exe'
\]
if !filereadable(g:chrome_exe)
continue
endif
let g:google_url='https://www.google.com/search?oq=&gws_rd=cr&dcr=0&ei=0&q='
:nmap :exe ":!start ".g:chrome_exe." --user-data-dir=%TEMP%/chrome-vim-sandbox file:///".expand("%:p")
:nmap :exe ":!start ".g:chrome_exe." --user-data-dir=%TEMP%/chrome-vim-sandbox ".g:google_url.expand("")
break
endfor