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