2004-06-13 20:20:40 +00:00
|
|
|
" Vim plugin for converting a syntax highlighted file to HTML.
|
2010-07-16 20:35:36 +02:00
|
|
|
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
2010-08-13 11:30:02 +02:00
|
|
|
" Last Change: 2010 Aug 12
|
2010-07-11 22:38:52 +02:00
|
|
|
"
|
2010-07-16 20:35:36 +02:00
|
|
|
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
|
|
|
|
" $VIMRUNTIME/syntax/2html.vim
|
2010-07-29 20:43:36 +02:00
|
|
|
"
|
|
|
|
" TODO:
|
2010-08-13 11:30:02 +02:00
|
|
|
" * Restore open/closed folds and cursor position after processing each file
|
|
|
|
" with option not to restore for speed increase
|
2010-07-29 20:43:36 +02:00
|
|
|
" * Add extra meta info (generation time, etc.)
|
2010-08-07 15:47:30 +02:00
|
|
|
" * Tidy up so we can use strict doctype more?
|
2010-08-13 11:30:02 +02:00
|
|
|
" * Implementation detail: add threshold for writing the lines to the html
|
|
|
|
" buffer before we're done (5000 or so lines should do it)
|
2010-07-29 20:43:36 +02:00
|
|
|
" * TODO comments for code cleanup scattered throughout
|
2010-07-11 22:38:52 +02:00
|
|
|
|
2010-07-25 12:46:44 +02:00
|
|
|
if exists('g:loaded_2html_plugin')
|
|
|
|
finish
|
|
|
|
endif
|
2010-08-13 11:30:02 +02:00
|
|
|
let g:loaded_2html_plugin = 'vim7.3_v6'
|
2010-07-25 12:46:44 +02:00
|
|
|
|
2010-07-11 22:38:52 +02:00
|
|
|
" Define the :TOhtml command when:
|
|
|
|
" - 'compatible' is not set
|
|
|
|
" - this plugin was not already loaded
|
|
|
|
" - user commands are available.
|
2004-06-13 20:20:40 +00:00
|
|
|
if !&cp && !exists(":TOhtml") && has("user_commands")
|
2010-07-11 22:38:52 +02:00
|
|
|
command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
|
2004-06-13 20:20:40 +00:00
|
|
|
endif
|
2010-07-16 20:35:36 +02:00
|
|
|
|
|
|
|
" Make sure any patches will probably use consistent indent
|
2010-07-18 14:07:22 +02:00
|
|
|
" vim: ts=8 sw=2 sts=2 noet
|