xref: /vim-8.2.3635/runtime/plugin/tohtml.vim (revision 076e8b2a)
1071d4279SBram Moolenaar" Vim plugin for converting a syntax highlighted file to HTML.
2349b2fb0SBram Moolenaar" Maintainer: Ben Fritz <[email protected]>
3*076e8b2aSBram Moolenaar" Last Change: 2010 Aug 02
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*076e8b2aSBram Moolenaar"   * Bug: error thrown when nowrapscan is set
108ada2ccaSBram Moolenaar"   * Diff mode with xhtml gives invalid markup
118ada2ccaSBram Moolenaar"   * Diff mode does not determine encoding
128ada2ccaSBram Moolenaar"   * Line number column has one character too few on empty lines
138ada2ccaSBram Moolenaar"     without CSS.
148ada2ccaSBram Moolenaar"   * Add extra meta info (generation time, etc.)
15*076e8b2aSBram Moolenaar"   * Fix strict doctype for other options?
168ada2ccaSBram Moolenaar"   * TODO comments for code cleanup scattered throughout
17071d4279SBram Moolenaar
187510fe74SBram Moolenaarif exists('g:loaded_2html_plugin')
197510fe74SBram Moolenaar  finish
207510fe74SBram Moolenaarendif
21*076e8b2aSBram Moolenaarlet g:loaded_2html_plugin = 'vim7.3_v3'
227510fe74SBram Moolenaar
23b02cbe34SBram Moolenaar" Define the :TOhtml command when:
24b02cbe34SBram Moolenaar" - 'compatible' is not set
25b02cbe34SBram Moolenaar" - this plugin was not already loaded
26b02cbe34SBram Moolenaar" - user commands are available.
27071d4279SBram Moolenaarif !&cp && !exists(":TOhtml") && has("user_commands")
28b02cbe34SBram Moolenaar  command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
29071d4279SBram Moolenaarendif
30349b2fb0SBram Moolenaar
31349b2fb0SBram Moolenaar" Make sure any patches will probably use consistent indent
327c86f4ccSBram Moolenaar"   vim: ts=8 sw=2 sts=2 noet
33