sponsor Vim development Vim logo Vim Book Ad

browserprint : Prints text files to the browser

 script karma  Rating 7/4, Downloaded by 621  Comments, bugs, improvements  Vim wiki

created by
Rob O'Dwyer
 
script type
utility
 
description
Usage
=====

Adds a new command, `:BrowserPrint`, which will send the contents of the current
buffer to a new browser window (or tab) in HTML, preserving the current font,
formatting, and encoding.

Just run `:BrowserPrint`, and watch the magic.

Why?
====

Printing from MacVim opens a PDF in Preview, with monospace font and the
encoding completely lost. Other GUI vims may have similar problems. This is a
workaround that relies on HTML and a decent web browser to preserve the
formatting nicely.

The idea is to send it to the browser, then use the browser's built-in print
functionality.

Limitations
===========
- Requires Python support in Vim
- Should work on Windows/Linux but not tested (yet!)
- HTML content in the file will screw up the output as it isn't escaped
 
install details
 

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
browserprint.zip 0.1 2011-05-19 7.0 Rob O'Dwyer Initial upload
ip used for rating: 18.225.209.95

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