xref: /vim-8.2.3635/runtime/plugin/tohtml.vim (revision bebca9da)
1" Vim plugin for converting a syntax highlighted file to HTML.
2" Maintainer: Ben Fritz <[email protected]>
3" Last Change: 2010 Aug 07
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"   * Line number column has one character too few on empty lines
11"     without CSS.
12"   * Add extra meta info (generation time, etc.)
13"   * Tidy up so we can use strict doctype more?
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_v4'
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