7
|
1 " Vim plugin for converting a syntax highlighted file to HTML.
|
|
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
|
|
3 " Last Change: 2003 Apr 06
|
|
4
|
|
5 " Don't do this when:
|
|
6 " - when 'compatible' is set
|
|
7 " - this plugin was already loaded
|
|
8 " - user commands are not available.
|
|
9 if !&cp && !exists(":TOhtml") && has("user_commands")
|
|
10 command -range=% TOhtml :call Convert2HTML(<line1>, <line2>)
|
|
11
|
|
12 func Convert2HTML(line1, line2)
|
|
13 if a:line2 >= a:line1
|
|
14 let g:html_start_line = a:line1
|
|
15 let g:html_end_line = a:line2
|
|
16 else
|
|
17 let g:html_start_line = a:line2
|
|
18 let g:html_end_line = a:line1
|
|
19 endif
|
|
20
|
|
21 runtime syntax/2html.vim
|
|
22
|
|
23 unlet g:html_start_line
|
|
24 unlet g:html_end_line
|
|
25 endfunc
|
|
26
|
|
27 endif
|