1" Vim plugin for converting a syntax highlighted file to HTML. 2" Maintainer: Ben Fritz <[email protected]> 3" Last Change: 2010 Aug 12 4" 5" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and 6" $VIMRUNTIME/syntax/2html.vim 7" 8" TODO: 9" * Restore open/closed folds and cursor position after processing each file 10" with option not to restore for speed increase 11" * Add extra meta info (generation time, etc.) 12" * Tidy up so we can use strict doctype more? 13" * Implementation detail: add threshold for writing the lines to the html 14" buffer before we're done (5000 or so lines should do it) 15" * TODO comments for code cleanup scattered throughout 16 17if exists('g:loaded_2html_plugin') 18 finish 19endif 20let g:loaded_2html_plugin = 'vim7.3_v6' 21 22" Define the :TOhtml command when: 23" - 'compatible' is not set 24" - this plugin was not already loaded 25" - user commands are available. 26if !&cp && !exists(":TOhtml") && has("user_commands") 27 command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>) 28endif 29 30" Make sure any patches will probably use consistent indent 31" vim: ts=8 sw=2 sts=2 noet 32