1- *syntax.txt* For Vim version 7.3. Last change: 2011 Apr 01
1+ *syntax.txt* For Vim version 7.3. Last change: 2011 Apr 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -468,18 +468,28 @@ disabled javascript to view closed folds. To use this option, use: >
468468 Setting html_no_foldcolumn with html_dynamic_folds will automatically set
469469html_hover_unfold, because otherwise the folds wouldn't be dynamic.
470470
471- By default "<pre> " and "</pre>" is used around the text. This makes it show
472- up as you see it in Vim, but without wrapping. If you prefer wrapping, at the
473- risk of making some things look a bit different, use: >
471+ By default "<pre> " and "</pre>" are used around the text. When 'wrap' is set
472+ in the window being converted, the CSS 2.0 "white-space:pre-wrap" value is
473+ used to wrap the text. You can explicitly enable the wrapping with: >
474+ :let g:html_pre_wrap = 1
475+ or disable with >
476+ :let g:html_pre_wrap = 0
477+ This generates HTML that looks very close to the Vim window, but unfortunately
478+ there can be minor differences such as the lack of a 'showbreak' option in in
479+ the HTML, or where line breaks can occur.
480+
481+ Another way to obtain text wrapping in the HTML, at the risk of making some
482+ things look even more different, is to use: >
474483 :let g:html_no_pre = 1
475484 This will use <br> at the end of each line and use " " for repeated
476- spaces.
485+ spaces. Doing it this way is more compatible with old browsers, but modern
486+ browsers support the "white-space" method.
477487
478- If you do use the "<pre> " tags, <Tab> characters in the text are included in
479- the generated output if they will have no effect on the appearance of the
480- text and it looks like they are in the document intentionally. This allows for
481- the HTML output to be copied and pasted from a browser without losing the
482- actual whitespace used in the document.
488+ If you do stick with the default "<pre> " tags, <Tab> characters in the text
489+ are included in the generated output if they will have no effect on the
490+ appearance of the text and it looks like they are in the document
491+ intentionally. This allows for the HTML output to be copied and pasted from a
492+ browser without losing the actual whitespace used in the document.
483493
484494Specifically, <Tab> characters will be included if the 'tabstop' option is set
485495to the default of 8, 'expandtab' is not set, and if neither the foldcolumn nor
@@ -502,13 +512,14 @@ inserted lines as with the side-by-side diff, use: >
502512 :let g:html_whole_filler = 1
503513 And to go back to displaying up to three lines again: >
504514 :unlet g:html_whole_filler
505- <
506- TOhtml uses the current value of 'fileencoding' if set, or 'encoding' if not,
507- to determine the charset and 'fileencoding' of the HTML file. In general, this
508- works for the encodings mentioned specifically by name in | encoding-names | , but
509- TOhtml will only automatically use those encodings which are widely supported.
510- However, you can override this to support specific encodings that may not be
511- automatically detected by default.
515+
516+ For most buffers, TOhtml uses the current value of 'fileencoding' if set, or
517+ 'encoding' if not, to determine the charset and 'fileencoding' of the HTML
518+ file. 'encoding' is always used for certain 'buftype' values. In general, this
519+ works for the encodings mentioned specifically by name in | encoding-names | ,
520+ but TOhtml will only automatically use those encodings which are widely
521+ supported. However, you can override this to support specific encodings that
522+ may not be automatically detected by default.
512523
513524To overrule all automatic charset detection, set g:html_use_encoding to the
514525name of the charset to be used. TOhtml will try to determine the appropriate
0 commit comments