jaxbot / browserlink.vim

Live browser editing for Vim
MIT License
711 stars 38 forks source link

automate browserlink #37

Open 7belrhalmia opened 9 years ago

7belrhalmia commented 9 years ago

every time i wont browserlink to work :

i have to go to ~/.vim/bundle/browserlinkjs/browserlink and do :node browserlink.js

how can i automate that .

here is the script i use :

// ==UserScript== // @name Browserlink Embed // @namespace http://use.i.E.your.homepage/ // @version 0.1 // @description enter something useful // @match http://localhost/* // @copyright 2012+, You // ==/UserScript==

 var src = document.createElement("script");
 src.src = "http://127.0.0.1:9001/js/socket.js";
 src.async = true;
document.head.appendChild(src);

my webserver run :http://localhost/index.html port 80

Tav0 commented 8 years ago

You shouldn't need to do that. I would rather have the

<script>

tag in your file. I tried using UserScript, but doesn't really work. I saw that you are missing your localhost port as well.