KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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: nmap <silent> <leader>w :!google-chrome % & The browser opens and displays the correct file. However, the command isn't running in the background, which is what the & is supposed to do. Instead vim drops to the background and I get some text output to my terminal window. I then have to do some clicking and Enter pressing to get my vim to come back to the foreground. Am I missing something? UPDATE: Thanks for all the suggestions. The issue seems to be that the focus seems to shift away from my terminal window when the browser window opens. Not sure if there's anything I can do about this.
Tags (comma-separated)
Save Edits
Cancel