1
- *syntax.txt* For Vim version 8.1 . Last change: 2019 Oct 27
1
+ *syntax.txt* For Vim version 8.2 . Last change: 2019 Dec 19
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -476,6 +476,16 @@ conversion. See |-E| and |-s-ex| for details. It is probably best to create a
476
476
script to replace all the -c commands and use it with the -u flag instead of
477
477
specifying each command separately.
478
478
479
+ *hl-TOhtmlProgress* *TOhtml-progress-color*
480
+ When displayed, the progress bar will show colored boxes along the statusline
481
+ as the HTML conversion proceeds. By default, the background color as the
482
+ current "DiffDelete" highlight group is used. If "DiffDelete" and "StatusLine"
483
+ have the same background color, TOhtml will automatically adjust the color to
484
+ differ. If you do not like the automatically selected colors, you can define
485
+ your own highlight colors for the progress bar. Example: >
486
+
487
+ hi TOhtmlProgress guifg=#c0ffee ctermbg=7
488
+ <
479
489
*g:html_number_lines*
480
490
Default: current 'number' setting.
481
491
When 0, buffer text is displayed in the generated HTML without line numbering.
@@ -507,8 +517,8 @@ For example: >
507
517
<
508
518
*g:html_use_css*
509
519
Default: 1.
510
- When 1, generate valid HTML 4.01 markup with CSS1 styling, supported in all
511
- modern browsers and most old browsers.
520
+ When 1, generate valid HTML 5 markup with CSS styling, supported in all modern
521
+ browsers and many old browsers.
512
522
When 0, generate <font> tags and similar outdated markup. This is not
513
523
recommended but it may work better in really old browsers, email clients,
514
524
forum posts, and similar situations where basic CSS support is unavailable.
@@ -580,23 +590,43 @@ affected in this way as follows:
580
590
Example, to make the fold column and line numbers uncopyable: >
581
591
:let g:html_prevent_copy = "fn"
582
592
<
583
- This feature is currently implemented by inserting read-only <input> elements
584
- into the markup to contain the uncopyable areas. This does not work well in
585
- all cases. When pasting to some applications which understand HTML, the
586
- <input> elements also get pasted. But plain-text paste destinations should
587
- always work.
593
+ The method used to prevent copying in the generated page depends on the value
594
+ of | g:html_use_input_for_pc | .
595
+
596
+ *g:html_use_input_for_pc*
597
+ Default: "fallback"
598
+ If | g:html_prevent_copy | is non-empty, then:
599
+
600
+ When "all", read-only <input> elements are used in place of normal text for
601
+ uncopyable regions. In some browsers, especially older browsers, after
602
+ selecting an entire page and copying the selection, the <input> tags are not
603
+ pasted with the page text. If | g:html_no_invalid | is 0, the <input> tags have
604
+ invalid type; this works in more browsers, but the page will not validate.
605
+ Note: this method does NOT work in recent versions of Chrome and equivalent
606
+ browsers; the <input> tags get pasted with the text.
607
+
608
+ When "fallback" (default value), the same <input> elements are generated for
609
+ older browsers, but newer browsers (detected by CSS feature query) hide the
610
+ <input> elements and instead use generated content in an ::before pseudoelement
611
+ to display the uncopyable text. This method should work with the largest
612
+ number of browsers, both old and new.
613
+
614
+ When "none", the <input> elements are not generated at all. Only the
615
+ generated-content method is used. This means that old browsers, notably
616
+ Internet Explorer, will either copy the text intended not to be copyable, or
617
+ the non-copyable text may not appear at all. However, this is the most
618
+ standards-based method, and there will be much less markup.
588
619
589
620
*g:html_no_invalid*
590
621
Default: 0.
591
- When 0, if | g:html_prevent_copy | is non-empty, an invalid attribute is
592
- intentionally inserted into the <input> element for the uncopyable areas. This
593
- increases the number of applications you can paste to without also pasting the
594
- <input> elements. Specifically, Microsoft Word will not paste the <input>
595
- elements if they contain this invalid attribute.
596
- When 1, no invalid markup is ever intentionally inserted, and the generated
597
- page should validate. However, be careful pasting into Microsoft Word when
598
- | g:html_prevent_copy | is non-empty; it can be hard to get rid of the <input>
599
- elements which get pasted.
622
+ When 0, if | g:html_prevent_copy | is non-empty and | g:html_use_input_for_pc | is
623
+ not "none", an invalid attribute is intentionally inserted into the <input>
624
+ element for the uncopyable areas. This prevents pasting the <input> elements
625
+ in some applications. Specifically, some versions of Microsoft Word will not
626
+ paste the <input> elements if they contain this invalid attribute. When 1, no
627
+ invalid markup is inserted, and the generated page should validate. However,
628
+ <input> elements may be pasted into some applications and can be difficult to
629
+ remove afterward.
600
630
601
631
*g:html_hover_unfold*
602
632
Default: 0.
@@ -936,10 +966,12 @@ Basic.
936
966
C *c.vim* *ft-c-syntax*
937
967
938
968
A few things in C highlighting are optional. To enable them assign any value
939
- to the respective variable. Example: >
969
+ (including zero) to the respective variable. Example: >
940
970
:let c_comment_strings = 1
941
- To disable them use ":unlet". Example: >
971
+ :let c_no_bracket_error = 0
972
+ To disable them use `:unlet ` . Example: >
942
973
:unlet c_comment_strings
974
+ Setting the value to zero doesn't work!
943
975
944
976
An alternative is to switch to the C++ highlighting: >
945
977
:set filetype=cpp
@@ -955,8 +987,8 @@ Variable Highlight ~
955
987
except { and } in first column
956
988
Default is to highlight them, otherwise you
957
989
can't spot a missing ")".
958
- *c_curly_error* highlight a missing }; this forces syncing from the
959
- start of the file, can be slow
990
+ *c_curly_error* highlight a missing } by finding all pairs; this
991
+ forces syncing from the start of the file, can be slow
960
992
*c_no_ansi* don't do standard ANSI types and constants
961
993
*c_ansi_typedefs* ... but do standard ANSI types
962
994
*c_ansi_constants* ... but do standard ANSI constants
@@ -1369,26 +1401,26 @@ to your startup file.
1369
1401
1370
1402
EUPHORIA *euphoria3.vim* *euphoria4.vim* *ft-euphoria-syntax*
1371
1403
1372
- Two syntax highlighting files exists for Euphoria. One for Euphoria
1373
- version 3.1.1, which is the default syntax highlighting file, and one for
1404
+ Two syntax highlighting files exists for Euphoria. One for Euphoria
1405
+ version 3.1.1, which is the default syntax highlighting file, and one for
1374
1406
Euphoria version 4.0.5 or later.
1375
1407
1376
- Euphoria version 3.1.1 (http://www.rapideuphoria.com/ ) is still necessary
1377
- for developing applications for the DOS platform, which Euphoria version 4
1408
+ Euphoria version 3.1.1 (http://www.rapideuphoria.com/ ) is still necessary
1409
+ for developing applications for the DOS platform, which Euphoria version 4
1378
1410
(http://www.openeuphoria.org/ ) does not support.
1379
1411
1380
- The following file extensions are auto-detected as Euphoria file type:
1381
-
1412
+ The following file extensions are auto-detected as Euphoria file type:
1413
+
1382
1414
*.e, *.eu, *.ew, *.ex, *.exu, *.exw
1383
1415
*.E, *.EU, *.EW, *.EX, *.EXU, *.EXW
1384
1416
1385
- To select syntax highlighting file for Euphoria, as well as for
1417
+ To select syntax highlighting file for Euphoria, as well as for
1386
1418
auto-detecting the *.e and *.E file extensions as Euphoria file type,
1387
1419
add the following line to your startup file: >
1388
1420
1389
1421
:let filetype_euphoria="euphoria3"
1390
1422
1391
- or
1423
+ or
1392
1424
1393
1425
:let filetype_euphoria="euphoria4"
1394
1426
@@ -2729,6 +2761,13 @@ This will add highlighting for the commands that BASH (version 2.05a and
2729
2761
later, and part earlier) adds.
2730
2762
2731
2763
2764
+ REGO *rego.vim* *ft-rego-syntax*
2765
+
2766
+ Rego is a query language developed by Styra. It is mostly used as a policy
2767
+ language for kubernetes, but can be applied to almost anything. Files with
2768
+ the following extensions are recognized as rego files: .rego.
2769
+
2770
+
2732
2771
RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax*
2733
2772
2734
2773
Syntax highlighting is enabled for code blocks within the document for a
@@ -2741,10 +2780,10 @@ To set a user-defined list of code block syntax highlighting: >
2741
2780
To assign multiple code block types to a single syntax, define
2742
2781
`rst_syntax_code_list` as a mapping: >
2743
2782
let rst_syntax_code_list = {
2744
- \ 'cpp' = ['cpp', 'c++'],
2745
- \ 'bash' = ['bash', 'sh'],
2783
+ \ 'cpp': ['cpp', 'c++'],
2784
+ \ 'bash': ['bash', 'sh'],
2746
2785
...
2747
- }
2786
+ \ }
2748
2787
2749
2788
To use color highlighting for emphasis text: >
2750
2789
let rst_use_emphasis_colors = 1
@@ -3505,26 +3544,26 @@ It will look much better with a font in a quadratic cell size, e.g. for X: >
3505
3544
YAML *yaml.vim* *ft-yaml-syntax*
3506
3545
3507
3546
*g:yaml_schema* *b:yaml_schema*
3508
- A YAML schema is a combination of a set of tags and a mechanism for resolving
3509
- non-specific tags. For user this means that YAML parser may, depending on
3510
- plain scalar contents, treat plain scalar (which can actually be only string
3511
- and nothing else) as a value of the other type: null, boolean, floating-point,
3512
- integer. `g: yaml_schema ` option determines according to which schema values
3547
+ A YAML schema is a combination of a set of tags and a mechanism for resolving
3548
+ non-specific tags. For user this means that YAML parser may, depending on
3549
+ plain scalar contents, treat plain scalar (which can actually be only string
3550
+ and nothing else) as a value of the other type: null, boolean, floating-point,
3551
+ integer. `g: yaml_schema ` option determines according to which schema values
3513
3552
will be highlighted specially. Supported schemas are
3514
3553
3515
3554
Schema Description ~
3516
3555
failsafe No additional highlighting.
3517
3556
json Supports JSON-style numbers, booleans and null.
3518
3557
core Supports more number, boolean and null styles.
3519
- pyyaml In addition to core schema supports highlighting timestamps,
3520
- but there are some differences in what is recognized as
3521
- numbers and many additional boolean values not present in core
3558
+ pyyaml In addition to core schema supports highlighting timestamps,
3559
+ but there are some differences in what is recognized as
3560
+ numbers and many additional boolean values not present in core
3522
3561
schema.
3523
3562
3524
3563
Default schema is `core` .
3525
3564
3526
- Note that schemas are not actually limited to plain scalars, but this is the
3527
- only difference between schemas defined in YAML specification and the only
3565
+ Note that schemas are not actually limited to plain scalars, but this is the
3566
+ only difference between schemas defined in YAML specification and the only
3528
3567
difference defined in the syntax file.
3529
3568
3530
3569
@@ -3626,7 +3665,7 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
3626
3665
3627
3666
clear: Syntax specific iskeyword setting is disabled and the
3628
3667
buffer-local 'iskeyword' setting is used.
3629
- {option} Set the syntax 'iskeyword' option to a new value.
3668
+ {option} Set the syntax 'iskeyword' option to a new value.
3630
3669
3631
3670
Example: >
3632
3671
:syntax iskeyword @,48-57,192-255,$,_
0 commit comments