blob: 433242fe1c57e3154ddfbabab06299bdccce8ea9 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim plugin for converting a syntax highlighted file to HTML.
Bram Moolenaar349b2fb2010-07-16 20:35:36 +02002" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
Bram Moolenaarbebca9d2010-08-07 15:47:30 +02003" Last Change: 2010 Aug 07
Bram Moolenaarb02cbe32010-07-11 22:38:52 +02004"
Bram Moolenaar349b2fb2010-07-16 20:35:36 +02005" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
6" $VIMRUNTIME/syntax/2html.vim
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +02007"
8" TODO:
Bram Moolenaar076e8b22010-08-05 21:54:00 +02009" * Bug: error thrown when nowrapscan is set
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +020010" * Line number column has one character too few on empty lines
11" without CSS.
12" * Add extra meta info (generation time, etc.)
Bram Moolenaarbebca9d2010-08-07 15:47:30 +020013" * Tidy up so we can use strict doctype more?
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +020014" * TODO comments for code cleanup scattered throughout
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar7510fe72010-07-25 12:46:44 +020016if exists('g:loaded_2html_plugin')
17 finish
18endif
Bram Moolenaarbebca9d2010-08-07 15:47:30 +020019let g:loaded_2html_plugin = 'vim7.3_v4'
Bram Moolenaar7510fe72010-07-25 12:46:44 +020020
Bram Moolenaarb02cbe32010-07-11 22:38:52 +020021" Define the :TOhtml command when:
22" - 'compatible' is not set
23" - this plugin was not already loaded
24" - user commands are available.
Bram Moolenaar071d4272004-06-13 20:20:40 +000025if !&cp && !exists(":TOhtml") && has("user_commands")
Bram Moolenaarb02cbe32010-07-11 22:38:52 +020026 command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
Bram Moolenaar071d4272004-06-13 20:20:40 +000027endif
Bram Moolenaar349b2fb2010-07-16 20:35:36 +020028
29" Make sure any patches will probably use consistent indent
Bram Moolenaar7c86f4c2010-07-18 14:07:22 +020030" vim: ts=8 sw=2 sts=2 noet