Very cool! I used to write Python code so I have been looking at the plugin API to see what’s involved - I will give it a try - thanks!
[quote=“facelessuser”]abigsnow and I have been throwing together a plugin to do just this (amongst other things).
Download zip at github.com/facelessuser/PrintHtml (mine is not the default branch; mine is a fork of abigsnow’s, but mine automatically pops up the print dialog in the web brower; abigsnow hasn’t pulled it in yet).
Make sure the plugin is in Packages/PrintHtml (in the zip file it will be named something else)
Put this in Packages/User/Default.sublime-commands. I picked a theme with a white background for printing.
{
"caption": "Print: Print in Broswer",
"command": "print_html",
"args": {"numbers": true, "browser_print": true, "color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme"}
},
It is fairly configurable, and it is currently under heavy development, so things might change. But this will allow you to execute the “Print: Print in Browser” command from the command palette. It will convert your view into an HTML file and open it in your default HTML application (it should be a web browser). And it will popup your browsers print dialog.[/quote]