xref: /vim-8.2.3635/runtime/plugin/tohtml.vim (revision 076e8b2a)
1" Vim plugin for converting a syntax highlighted file to HTML.
2" Maintainer: Ben Fritz <[email protected]>
3" Last Change: 2010 Aug 02
4"
5" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
6" $VIMRUNTIME/syntax/2html.vim
7"
8" TODO:
9"   * Bug: error thrown when nowrapscan is set
10"   * Diff mode with xhtml gives invalid markup
11"   * Diff mode does not determine encoding
12"   * Line number column has one character too few on empty lines
13"     without CSS.
14"   * Add extra meta info (generation time, etc.)
15"   * Fix strict doctype for other options?
16"   * TODO comments for code cleanup scattered throughout
17
18if exists('g:loaded_2html_plugin')
19  finish
20endif
21let g:loaded_2html_plugin = 'vim7.3_v3'
22
23" Define the :TOhtml command when:
24" - 'compatible' is not set
25" - this plugin was not already loaded
26" - user commands are available.
27if !&cp && !exists(":TOhtml") && has("user_commands")
28  command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
29endif
30
31" Make sure any patches will probably use consistent indent
32"   vim: ts=8 sw=2 sts=2 noet
33