Open current file in web browser in Vim

前端 未结 9 607
自闭症患者
自闭症患者 2020-12-24 15:01

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:

9条回答
  •  孤独总比滥情好
    2020-12-24 15:30

    For windows 7 or 10 put this line into your .vimrc file:

    nnoremap   :!start file://C:/Users//AppData/Local/Google/Chrome/Application/chrome.exe %:p
    

    or try:

    nnoremap   :!start file://C:/Program Files (x86)\Google\Chrome\Application\chrome.exe %:p
    

    for more details see this link: Preview current HTML file

提交回复
热议问题