annotate runtime/plugin/tohtml.vim @ 1431:d065616e0836 v7.1.146

updated for version 7.1-146
author vimboss
date Mon, 29 Oct 2007 21:38:54 +0000
parents 3fc0f57ecb91
children a59e6ac5ed28
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim plugin for converting a syntax highlighted file to HTML.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Last Change: 2003 Apr 06
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Don't do this when:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " - when 'compatible' is set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " - this plugin was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " - user commands are not available.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if !&cp && !exists(":TOhtml") && has("user_commands")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 command -range=% TOhtml :call Convert2HTML(<line1>, <line2>)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 func Convert2HTML(line1, line2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if a:line2 >= a:line1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let g:html_start_line = a:line1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 let g:html_end_line = a:line2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let g:html_start_line = a:line2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 let g:html_end_line = a:line1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 runtime syntax/2html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 unlet g:html_start_line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 unlet g:html_end_line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endfunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif