1071d4279SBram Moolenaar" Vim plugin for converting a syntax highlighted file to HTML. 2349b2fb0SBram Moolenaar" Maintainer: Ben Fritz <[email protected]> 3*8df7f888SBram Moolenaar" Last Change: 2010 Aug 12 4b02cbe34SBram Moolenaar" 5349b2fb0SBram Moolenaar" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and 6349b2fb0SBram Moolenaar" $VIMRUNTIME/syntax/2html.vim 78ada2ccaSBram Moolenaar" 88ada2ccaSBram Moolenaar" TODO: 9*8df7f888SBram Moolenaar" * Restore open/closed folds and cursor position after processing each file 10*8df7f888SBram Moolenaar" with option not to restore for speed increase 118ada2ccaSBram Moolenaar" * Add extra meta info (generation time, etc.) 12bebca9daSBram Moolenaar" * Tidy up so we can use strict doctype more? 13*8df7f888SBram Moolenaar" * Implementation detail: add threshold for writing the lines to the html 14*8df7f888SBram Moolenaar" buffer before we're done (5000 or so lines should do it) 158ada2ccaSBram Moolenaar" * TODO comments for code cleanup scattered throughout 16071d4279SBram Moolenaar 177510fe74SBram Moolenaarif exists('g:loaded_2html_plugin') 187510fe74SBram Moolenaar finish 197510fe74SBram Moolenaarendif 20*8df7f888SBram Moolenaarlet g:loaded_2html_plugin = 'vim7.3_v6' 217510fe74SBram Moolenaar 22b02cbe34SBram Moolenaar" Define the :TOhtml command when: 23b02cbe34SBram Moolenaar" - 'compatible' is not set 24b02cbe34SBram Moolenaar" - this plugin was not already loaded 25b02cbe34SBram Moolenaar" - user commands are available. 26071d4279SBram Moolenaarif !&cp && !exists(":TOhtml") && has("user_commands") 27b02cbe34SBram Moolenaar command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>) 28071d4279SBram Moolenaarendif 29349b2fb0SBram Moolenaar 30349b2fb0SBram Moolenaar" Make sure any patches will probably use consistent indent 317c86f4ccSBram Moolenaar" vim: ts=8 sw=2 sts=2 noet 32