Render View
Sublime Text plugin for rendering a view to html for printing etc. Understands markdown.
Details
Installs
- Total 52
- Win 46
- Mac 0
- Linux 6
| Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Render View
Sublime Text plugin renders the text in a view to html with all scheme colors.
The primary purpose is for wysiwyg printing in full color: first render to html, then print from the browser.
Built for ST4 on Windows. Linux and OSX should be ok but are minimally tested - PRs welcome.
Features
- Lines wrap properly.
- Line numbers are optional.
- If the text is markdown, renders to html using Markdeep. There is a basic default style or specify a custom css file.
- Note that relative links (like graphics) are currently unsupported. If it's important, they can be manually copied to the output directory.
- Supports scheme colors from Highlight Token (recommended) and Notr.
Commands and Menus
| Command | Description | Args |
|---|---|---|
| sbot_render_to_html | Render current file to html | line_numbers:true OR false |
| sbot_render_markdown | Render current markdown file to html |
There is no default Context.sublime-menu file in this plugin.
Add the commands you like to your own User\Context.sublime-menu file. Typical entries are:
{ "caption": "Render",
"children":
[
{ "caption": "Html", "command": "sbot_render_to_html", "args" : { "line_numbers": false } },
{ "caption": "Html + Lines", "command": "sbot_render_to_html", "args" : { "line_numbers": true } },
{ "caption": "Markdown", "command": "sbot_render_markdown" },
]
}
Settings
| Setting | Description | Options |
|---|---|---|
| html_font_face | For rendered html | font name - usually monospace |
| html_font_size | For rendered html/markdown | point size |
| html_background | Background color | color name |
| max_file | Max file size to render | in Mb |
| md_css | Optional css file for md | |
| md_toc | Optional table of contents | |
| output_dir | Output dir for rendered files - if null asks user for a file name. |
Colors
New scopes have been added to support this application. Adjust these to taste and add
to your active Packages\User\your.sublime-color-scheme file.
Note that these are shared with the Notr and Highlight Token packages.
{ "scope": "markup.user_hl1", "background": "red", "foreground": "white" },
{ "scope": "markup.user_hl2", "background": "green", "foreground": "white" },
{ "scope": "markup.user_hl3", "background": "blue", "foreground": "white" },
{ "scope": "markup.user_hl4", "background": "yellow", "foreground": "black" },
{ "scope": "markup.user_hl5", "background": "lime", "foreground": "black" },
{ "scope": "markup.user_hl6", "background": "cyan", "foreground": "black" },
{ "scope": "markup.fixed_hl1", "background": "gainsboro", "foreground": "red" },
{ "scope": "markup.fixed_hl2", "background": "gainsboro", "foreground": "green" },
{ "scope": "markup.fixed_hl3", "background": "gainsboro", "foreground": "blue" },
Notes
sbot_common.pycontains miscellaneous common components primarily for internal use by the sbot family. This includes a very simple logger primarily for user-facing information, syntax errors and the like. Log file is in<ST_PACKAGES_DIR>\User\RenderView\RenderView.log.If you pull the source it must be in a directory named
Render Viewrather than the repo name. This is to satisfy PackageControl naming requirements.