Reputation: 594
I've been using VIM for a few weeks now while messing with various web languages and I'm really enjoying it.
I find it cumbersome having to tab or click into my browser and refresh the page to see the effect of a code change. It's even more annoying as I'm using Virtual Box and I tend to be working from PDF files on the host system so I have limited window space.
Do you gurus have any fancy ways of doing this? I was wondering if it's possible to split the VIM workspace and have links/lynx in a window of its own or something to that effect?
edit:
out of curiosity, if anyone is still glancing at this:-
is it possible to execute a browser from vim and load a URL based on a variable of sorts?
:! firefox http://localhost/bla/$CURRENTWORKINGFILE
sort of thing?
Upvotes: 3
Views: 890
Reputation: 547
I don't know how to do this in specific, but I know of two plugins which let you communicate with a shell from within VIM:
Upvotes: 2
Reputation: 186762
If you are developing locally where no one cares, how about setting some JS to refresh the page?
<script>
setTimeout(function() { location.reload() }, 60000 );
</script>
That way you can keep working in vim and take a glance at the web page every min or so to see it refresh. This should work for most web pages.
I do this on dual monitors by leaving VIM open on one monitor and the browser on the other.
Upvotes: 5