sponsor Vim development Vim logo Vim Book Ad

preview.vim : Preview current file in selected browser.

 script karma  Rating 6/5, Downloaded by 942  Comments, bugs, improvements  Vim wiki

created by
Mark Woodward
 
script type
utility
 
description
This has been tested on windows only. It  can probably be made to work on linux but is untested on that platform..(one day ;-))
(If anyone modifies this script to work on both platforms, please feel free to upload the modified script)

Pressing <S-F12> will prompt you for the browser you would like to preview the current file in. Browsers can be added by modifying the appropriately commented lines in the script.  (make sure to modify the current paths for browsers on your system).

There is also the option to include only files of a specific type. These are .php, .php3, .jsp, .asp, .html, .htm, and .vim at the moment but others can easily be added.

If the file is in your server directory (http:\\localhost\) or a sub directory of it, it will be previewed through the server - NOT as a local file.

egs http:\\localhost\test.php
        http:\\localhost\examples\chapter04\index.php

Otherwise it will be previewed simply as a local file
eg    c:\mysite\index.html
 
install details
place in your  plugin directory
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
preview.vim 0.1 2003-10-18 6.0 Mark Woodward Initial upload
ip used for rating: 3.149.251.155

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github