annotate runtime/plugin/tohtml.vim @ 33674:021e5bb88513 v9.0.2074

patch 9.0.2074: Completion menu may be wrong Commit: https://github.com/vim/vim/commit/daef8c74375141974d61b85199b383017644978c Author: Christian Brabandt <cb@256bit.org> Date: Fri Oct 27 19:16:26 2023 +0200 patch 9.0.2074: Completion menu may be wrong Problem: Completion menu may be wrong Solution: Check for the original direction of the completion menu, add more tests, make it work with 'noselect' completion: move in right direction when filling completion_info() When moving through the insert completion menu and switching directions, we need to make sure we start at the correct position in the list and move correctly forward/backwards through it, so that we do not skip entries and the selected item points to the correct entry in the list of completion entries generated by the completion_info() function. The general case is this: 1) CTRL-X CTRL-N, we will traverse the list starting from compl_first_match and then go forwards (using the cp->next pointer) through the list (skipping the very first entry, which has the CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry 2) CTRL-X CTRL-P, we will traverse the list starting from compl_first_match (which now points to the last entry). The previous entry will have the CP_ORIGINAL_TEXT flag set, so we need to start traversing the list from the second prev pointer. There are in fact 2 special cases after starting the completion menu with CTRL-X: 3) CTRL-N and then going backwards by pressing CTRL-P again. compl_first_match will point to the same entry as in step 1 above, but since compl_dir_foward() has been switched by pressing CTRL-P to backwards we need to pretend to be in still in case 1 and still traverse the list in forward direction using the cp_next pointer 4) CTRL-P and then going forwards by pressing CTRL-N again. compl_first_match will point to the same entry as in step 2 above, but since compl_dir_foward() has been switched by pressing CTRL-N to forwards we need to pretend to be in still in case 2 and still traverse the list in backward direction using the cp_prev pointer For the 'noselect' case however, this is slightly different again. When going backwards, we only need to go one cp_prev pointer back. And resting of the direction works again slightly different. So we need to take the noselect option into account when deciding in which direction to iterate through the list of matches. related: #13402 related: #12971 closes: #13408 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 27 Oct 2023 19:30:05 +0200
parents d77a9aab91ad
children
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.
2321
1902913f2049 Improved version of 2html.vim.
Bram Moolenaar <bram@vim.org>
parents: 2304
diff changeset
2 " Maintainer: Ben Fritz <fritzophrenic@gmail.com>
33216
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
3 " Last Change: 2023 Sep 07
2304
a59e6ac5ed28 When the buffer is in diff mode, have :TOhtml create HTML to show the diff
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 "
2321
1902913f2049 Improved version of 2html.vim.
Bram Moolenaar <bram@vim.org>
parents: 2304
diff changeset
5 " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
1902913f2049 Improved version of 2html.vim.
Bram Moolenaar <bram@vim.org>
parents: 2304
diff changeset
6 " $VIMRUNTIME/syntax/2html.vim
2432
80229a724a11 Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents: 2401
diff changeset
7 "
2401
e7751177126b Add the synconcealed() function and use it for :TOhtml. (Benjamin Fritz)
Bram Moolenaar <bram@vim.org>
parents: 2334
diff changeset
8 if exists('g:loaded_2html_plugin')
e7751177126b Add the synconcealed() function and use it for :TOhtml. (Benjamin Fritz)
Bram Moolenaar <bram@vim.org>
parents: 2334
diff changeset
9 finish
e7751177126b Add the synconcealed() function and use it for :TOhtml. (Benjamin Fritz)
Bram Moolenaar <bram@vim.org>
parents: 2334
diff changeset
10 endif
33216
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
11 let g:loaded_2html_plugin = 'vim9.0_v2'
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2788
diff changeset
12
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2788
diff changeset
13 "
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
14 " Changelog: {{{
33216
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
15 " 9.0_v2 (this version): - Warn if using deprecated g:use_xhtml option
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
16 " - Change default g:html_use_input_for_pc to "none"
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
17 " instead of "fallback". All modern browsers support
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
18 " the "user-select: none" and "content:" CSS
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
19 " properties so the older method relying on extra
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
20 " markup and unspecified browser/app clipboard
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
21 " handling is only needed in rare special cases.
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
22 " - Fix SourceForge issue #33: generate diff filler
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
23 " correctly when new lines have been added to or
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
24 " removed from end of buffer.
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
25 " - Fix SourceForge issue #32/Vim Github issue #8547:
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
26 " use translated highlight ID for styling the
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
27 " special-use group names (e.g. LineNr) used
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
28 " directly by name in the 2html processing.
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
29 " - Fix SourceForge issue #26, refactoring to use
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
30 " :let-heredoc style string assignment and
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
31 " additional fixes for ".." vs. "." style string
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
32 " concatenation. Requires Vim v8.1.1354 or higher.
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
33 " 9.0_v1 (Vim 9.0.1275): - Implement g:html_no_doc and g:html_no_modeline
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
34 " for diff mode. Add tests.
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
35 " (Vim 9.0.1122): NOTE: no version string update for this version!
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
36 " - Bugfix for variable name in g:html_no_doc
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
37 " (Vim 9.0.0819): NOTE: no version string update for this version!
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
38 " - Add options g:html_no_doc, g:html_no_lines,
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
39 " and g:html_no_modeline (partially included in Vim
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
40 " runtime prior to version string update).
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
41 " - Updates for new Vim9 string append style (i.e. use
33216
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
42 " ".." instead of "."). Requires Vim version
d77a9aab91ad runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Christian Brabandt <cb@256bit.org>
parents: 31885
diff changeset
43 " 8.1.1114 or higher.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
44 "
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
45 " 8.1 updates: {{{
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
46 " 8.1_v2 (Vim 8.1.2312): - Fix SourceForge issue #19: fix calculation of tab
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
47 " stop position to use in expanding a tab, when that
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
48 " tab occurs after a syntax match which in turn
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
49 " comes after previously expanded tabs.
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
50 " - Set eventignore while splitting a window for the
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
51 " destination file to ignore FileType events;
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
52 " speeds up processing when the destination file
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
53 " already exists and HTML highlight takes too long.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
54 " - Fix SourceForge issue #20: progress bar could not be
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
55 " seen when DiffDelete background color matched
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
56 " StatusLine background color. Added TOhtmlProgress
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
57 " highlight group for manual user override, but
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
58 " calculate it to be visible compared to StatusLine
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
59 " by default.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
60 " - Fix SourceForge issue #1: Remove workaround for old
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
61 " browsers which don't support 'ch' CSS unit, since
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
62 " all modern browsers, including IE>=9, support it.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
63 " - Fix SourceForge issue #10: support termguicolors
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
64 " - Fix SourceForge issue #21: default to using
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
65 " generated content instead of <input> tags for
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
66 " uncopyable text, so that text is correctly
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
67 " prevented from being copied in chrome. Use
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
68 " g:html_use_input_for_pc option to control the
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
69 " method used.
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
70 " - Switch to HTML5 to allow using vnu as a validator
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
71 " in unit test.
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
72 " - Fix fallback sizing of <input> tags for browsers
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
73 " without "ch" support.
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
74 " - Fix cursor on unselectable diff filler text.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
75 " 8.1_v1 (Vim 8.1.0528): - Fix SourceForge issue #6: Don't generate empty
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
76 " script tag.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
77 " - Fix SourceForge issue #5: javascript should
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
78 " declare variables with "var".
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
79 " - Fix SourceForge issue #13: errors thrown sourcing
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 15033
diff changeset
80 " 2html.vim directly when plugins not loaded.
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
81 " - Fix SourceForge issue #16: support 'vartabstop'.
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
82 "}}}
15033
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
83 "
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
84 " 7.4 updates: {{{
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
85 " 7.4_v2 (Vim 7.4.0899): Fix error raised when converting a diff containing
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
86 " an empty buffer. Jan Stocker: allow g:html_font to
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
87 " take a list so it is easier to specfiy fallback
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
88 " fonts in the generated CSS.
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
89 " 7.4_v1 (Vim 7.4.0000): Fix modeline mangling for new "Vim:" format, and
5161
f7add3891e95 Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents: 5024
diff changeset
90 " also for version-specific modelines like "vim>703:".
15033
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
91 "}}}
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
92 "
5161
f7add3891e95 Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents: 5024
diff changeset
93 " 7.3 updates: {{{
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
94 " 7.3_v14 (Vim 7.3.1246): Allow suppressing line number anchors using
5024
7a2ffd685c0e Update runtime files. Remove duplicate tags in help.
Bram Moolenaar <bram@vim.org>
parents: 5003
diff changeset
95 " g:html_line_ids=0. Allow customizing
7a2ffd685c0e Update runtime files. Remove duplicate tags in help.
Bram Moolenaar <bram@vim.org>
parents: 5003
diff changeset
96 " important IDs (like line IDs and fold IDs) using
25773
11b656e74444 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 18639
diff changeset
97 " g:html_id_expr evaluated when the buffer conversion
5024
7a2ffd685c0e Update runtime files. Remove duplicate tags in help.
Bram Moolenaar <bram@vim.org>
parents: 5003
diff changeset
98 " is started.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
99 " 7.3_v13 (Vim 7.3.1088): Keep foldmethod at manual in the generated file and
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
100 " insert modeline to set it to manual.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
101 " Fix bug: diff mode with 2 unsaved buffers creates a
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
102 " duplicate of one buffer instead of including both.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
103 " Add anchors to each line so you can put '#L123'
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
104 " or '#123' at the end of the URL to jump to line 123
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
105 " (idea by Andy Spencer). Add javascript to open folds
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
106 " to show the anchor being jumped to if it is hidden.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
107 " Fix XML validation error: &nsbp; not part of XML.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
108 " Allow TOhtml to chain together with other commands
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
109 " using |.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
110 " 7.3_v12 (Vim 7.3.0616): Fix modeline mangling to also work for when multiple
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
111 " highlight groups make up the start-of-modeline text.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
112 " Improve render time of page with uncopyable regions
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
113 " by not using one-input-per-char. Change name of
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
114 " uncopyable option from html_unselectable to
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
115 " html_prevent_copy. Added html_no_invalid option and
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
116 " default to inserting invalid markup for uncopyable
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
117 " regions to prevent MS Word from pasting undeletable
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
118 " <input> elements. Fix 'cpo' handling (Thilo Six).
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
119 " 7.3_v12b1: Add html_unselectable option. Rework logic to
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
120 " eliminate post-processing substitute commands in
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
121 " favor of doing the work up front. Remove unnecessary
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
122 " special treatment of 'LineNr' highlight group. Minor
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
123 " speed improvements. Fix modeline mangling in
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
124 " generated output so it works for text in the first
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
125 " column. Fix missing line number and fold column in
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
126 " diff filler lines. Fix that some fonts have a 1px
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
127 " gap (using a dirty hack, improvements welcome). Add
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
128 " "colorscheme" meta tag. Does NOT include support for
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
129 " the new default foldtext added in v11, as the patch
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
130 " adding it has not yet been included in Vim.
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
131 " 7.3_v11 ( unreleased ): Support new default foldtext from patch by Christian
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
132 " Brabandt in
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
133 " http://groups.google.com/d/topic/vim_dev/B6FSGfq9VoI/discussion.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
134 " This patch has not yet been included in Vim, thus
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
135 " these changes are removed in the next version.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
136 " 7.3_v10 (Vim 7.3.0227): Fix error E684 when converting a range wholly inside
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
137 " multiple nested folds with dynamic folding on.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
138 " Also fix problem with foldtext in this situation.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
139 " 7.3_v9 (Vim 7.3.0170): Add html_pre_wrap option active with html_use_css
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
140 " and without html_no_pre, default value same as
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
141 " 'wrap' option, (Andy Spencer). Don't use
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
142 " 'fileencoding' for converted document encoding if
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
143 " 'buftype' indicates a special buffer which isn't
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
144 " written.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
145 " 7.3_v8 (Vim 7.3.0100): Add html_expand_tabs option to allow leaving tab
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
146 " characters in generated output (Andy Spencer).
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
147 " Escape text that looks like a modeline so Vim
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
148 " doesn't use anything in the converted HTML as a
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
149 " modeline. Bugfixes: Fix folding when a fold starts
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
150 " before the conversion range. Remove fold column when
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
151 " there are no folds.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
152 " 7.3_v7 (Vim 7-3-0063): see betas released on vim_dev below:
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
153 " 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
154 " 7.3_v7b2: Remove automatic detection of encodings that are not
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
155 " supported by all major browsers according to
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
156 " http://wiki.whatwg.org/wiki/Web_Encodings and
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
157 " convert to UTF-8 for all Unicode encodings. Make
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
158 " HTML encoding to Vim encoding detection be
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
159 " case-insensitive for built-in pairs.
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
160 " 7.3_v7b1: Remove use of setwinvar() function which cannot be
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
161 " called in restricted mode (Andy Spencer). Use
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
162 " 'fencoding' instead of 'encoding' to determine by
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
163 " charset, and make sure the 'fenc' of the generated
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
164 " file matches its indicated charset. Add charsets for
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
165 " all of Vim's natively supported encodings.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
166 " 7.3_v6 (Vim 7.3.0000): Really fix bug with 'nowrapscan', 'magic' and other
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
167 " user settings interfering with diff mode generation,
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
168 " trailing whitespace (e.g. line number column) when
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
169 " using html_no_pre, and bugs when using
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
170 " html_hover_unfold.
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2788
diff changeset
171 " 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
172 " folds in diff mode when first line was folded.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
173 " 7.3_v4 (Vim 7.3.0000): Bugfixes, especially for xhtml markup, and diff mode
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
174 " 7.3_v3 (Vim 7.3.0000): Refactor option handling and make html_use_css
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
175 " default to true when not set to anything. Use strict
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
176 " doctypes where possible. Rename use_xhtml option to
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
177 " html_use_xhtml for consistency. Use .xhtml extension
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
178 " when using this option. Add meta tag for settings.
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
179 " 7.3_v2 (Vim 7.3.0000): Fix syntax highlighting in diff mode to use both the
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
180 " diff colors and the normal syntax colors
7176
30042ddff503 commit https://github.com/vim/vim/commit/60cce2fb736c8ff6fdb9603f502d3c15f1f7a25d
Christian Brabandt <cb@256bit.org>
parents: 5161
diff changeset
181 " 7.3_v1 (Vim 7.3.0000): Add conceal support and meta tags in output
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
182 "}}}
5161
f7add3891e95 Updated runtime files. Fix NL translations.
Bram Moolenaar <bram@vim.org>
parents: 5024
diff changeset
183 "}}}
2401
e7751177126b Add the synconcealed() function and use it for :TOhtml. (Benjamin Fritz)
Bram Moolenaar <bram@vim.org>
parents: 2334
diff changeset
184
15033
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
185 " TODO: {{{
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
186 " * Check the issue tracker:
31885
cc751d944b7e Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
187 " https://sourceforge.net/p/vim-tohtml/issues/search/?q=%21status%3Aclosed
15033
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
188 " * Options for generating the CSS in external style sheets. New :TOcss
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
189 " command to convert the current color scheme into a (mostly) generic CSS
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
190 " stylesheet which can be re-used. Alternate stylesheet support? Good start
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
191 " by Erik Falor
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
192 " ( https://groups.google.com/d/topic/vim_use/7XTmC4D22dU/discussion ).
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
193 " * Add optional argument to :TOhtml command to specify mode (gui, cterm,
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
194 " term) to use for the styling. Suggestion by "nacitar".
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
195 " * Add way to override or specify which RGB colors map to the color numbers
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
196 " in cterm. Get better defaults than just guessing? Suggestion by "nacitar".
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
197 " * Disable filetype detection until after all processing is done.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
198 " * Add option for not generating the hyperlink on stuff that looks like a
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
199 " URL? Or just color the link to fit with the colorscheme (and only special
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
200 " when hovering)?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
201 " * Bug: Opera does not allow printing more than one page if uncopyable
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
202 " regions is turned on. Possible solution: Add normal text line numbers with
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
203 " display:none, set to display:inline for print style sheets, and hide
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
204 " <input> elements for print, to allow Opera printing multiple pages (and
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
205 " other uncopyable areas?). May need to make the new text invisible to IE
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
206 " with conditional comments to prevent copying it, IE for some reason likes
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
207 " to copy hidden text. Other browsers too?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
208 " * Bug: still a 1px gap throughout the fold column when html_prevent_copy is
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
209 " "fn" in some browsers. Specifically, in Chromium on Ubuntu (but not Chrome
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
210 " on Windows). Perhaps it is font related?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
211 " * Bug: still some gaps in the fold column when html_prevent_copy contains
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
212 " 'd' and showing the whole diff (observed in multiple browsers). Only gaps
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
213 " on diff lines though.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
214 " * Undercurl support via CSS3, with fallback to dotted or something:
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
215 " https://groups.google.com/d/topic/vim_use/BzXA6He1pHg/discussion
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
216 " * Redo updates for modified default foldtext (v11) when/if the patch is
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
217 " accepted to modify it.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
218 " * Test case +diff_one_file-dynamic_folds+expand_tabs-hover_unfold
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
219 " +ignore_conceal-ignore_folding+no_foldcolumn+no_pre+no_progress
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
220 " +number_lines-pre_wrap-use_css+use_xhtml+whole_filler.xhtml
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
221 " does not show the whole diff filler as it is supposed to?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
222 " * Bug: when 'isprint' is wrong for the current encoding, will generate
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
223 " invalid content. Can/should anything be done about this? Maybe a separate
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
224 " plugin to correct 'isprint' based on encoding?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
225 " * Check to see if the windows-125\d encodings actually work in Unix without
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
226 " the 8bit- prefix. Add prefix to autoload dictionaries for Unix if not.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
227 " * Font auto-detection similar to
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
228 " http://www.vim.org/scripts/script.php?script_id=2384 but for a variety of
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
229 " platforms.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
230 " * Pull in code from http://www.vim.org/scripts/script.php?script_id=3113 :
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
231 " - listchars support
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
232 " - full-line background highlight
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
233 " - other?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
234 " * Make it so deleted lines in a diff don't create side-scrolling (get it
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
235 " free with full-line background highlight above).
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
236 " * Restore open/closed folds and cursor position after processing each file
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
237 " with option not to restore for speed increase.
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
238 " * Add extra meta info (generation time, etc.)?
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
239 " * Tidy up so we can use strict doctype in even more situations
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
240 " * Implementation detail: add threshold for writing the lines to the html
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
241 " buffer before we're done (5000 or so lines should do it)
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
242 " * TODO comments for code cleanup scattered throughout
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
243 "}}}
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
244
2304
a59e6ac5ed28 When the buffer is in diff mode, have :TOhtml create HTML to show the diff
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
245 " Define the :TOhtml command when:
a59e6ac5ed28 When the buffer is in diff mode, have :TOhtml create HTML to show the diff
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
246 " - 'compatible' is not set
15033
f8b0f1e42f2c Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7176
diff changeset
247 " - this plugin or user override was not already loaded
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
248 " - user commands are available. {{{
2304
a59e6ac5ed28 When the buffer is in diff mode, have :TOhtml create HTML to show the diff
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
249 if !&cp && !exists(":TOhtml") && has("user_commands")
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 3713
diff changeset
250 command -range=% -bar TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
251 endif "}}}
2321
1902913f2049 Improved version of 2html.vim.
Bram Moolenaar <bram@vim.org>
parents: 2304
diff changeset
252
1902913f2049 Improved version of 2html.vim.
Bram Moolenaar <bram@vim.org>
parents: 2304
diff changeset
253 " Make sure any patches will probably use consistent indent
3713
9910cbff5f16 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
254 " vim: ts=8 sw=2 sts=2 noet fdm=marker