Skip to content

Commit 8b7fbe1

Browse files
committed
syntax.txt: Update Vim 8.2.3687
1 parent 66a62c9 commit 8b7fbe1

File tree

1 file changed

+97
-39
lines changed

1 file changed

+97
-39
lines changed

en/syntax.txt

Lines changed: 97 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 8.2. Last change: 2021 Aug 16
1+
*syntax.txt* For Vim version 8.2. Last change: 2021 Nov 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1081,33 +1081,47 @@ This works immediately.
10811081

10821082
CLOJURE *ft-clojure-syntax*
10831083

1084-
The default syntax groups can be augmented through the
1085-
*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The
1086-
value should be a |Dictionary| of syntax group names to a |List| of custom
1087-
identifiers:
1084+
*g:clojure_syntax_keywords*
1085+
1086+
Syntax highlighting of public vars in "clojure.core" is provided by default,
1087+
but additional symbols can be highlighted by adding them to the
1088+
|g:clojure_syntax_keywords| variable. The value should be a |Dictionary| of
1089+
syntax group names, each containing a |List| of identifiers.
10881090
>
10891091
let g:clojure_syntax_keywords = {
1090-
\ 'clojureMacro': ["defproject", "defcustom"],
1091-
\ 'clojureFunc': ["string/join", "string/replace"]
1092+
\ 'clojureMacro': ["defproject", "defcustom"],
1093+
\ 'clojureFunc': ["string/join", "string/replace"]
10921094
\ }
10931095
<
10941096
Refer to the Clojure syntax script for valid syntax group names.
10951097

1096-
If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only
1097-
language constants and special forms are matched.
1098+
There is also *b:clojure_syntax_keywords* which is a buffer-local variant of
1099+
this variable intended for use by plugin authors to highlight symbols
1100+
dynamically.
1101+
1102+
By setting the *b:clojure_syntax_without_core_keywords* variable, vars from
1103+
"clojure.core" will not be highlighted by default. This is useful for
1104+
namespaces that have set `(:refer-clojure :only [])`
1105+
10981106

1099-
Setting *g:clojure_fold* enables folding Clojure code via the syntax engine.
1100-
Any list, vector, or map that extends over more than one line can be folded
1101-
using the standard Vim |fold-commands|.
1107+
*g:clojure_fold*
11021108

1103-
Please note that this option does not work with scripts that redefine the
1104-
bracket syntax regions, such as rainbow-parentheses plugins.
1109+
Setting |g:clojure_fold| to `1` will enable the folding of Clojure code. Any
1110+
list, vector or map that extends over more than one line can be folded using
1111+
the standard Vim |fold-commands|.
11051112

1106-
This option is off by default.
1113+
1114+
*g:clojure_discard_macro*
1115+
1116+
Set this variable to `1` to enable basic highlighting of Clojure's "discard
1117+
reader macro".
11071118
>
1108-
" Default
1109-
let g:clojure_fold = 0
1119+
#_(defn foo [x]
1120+
(println x))
11101121
<
1122+
Note that this option will not correctly highlight stacked discard macros
1123+
(e.g. `#_#_`).
1124+
11111125

11121126
COBOL *cobol.vim* *ft-cobol-syntax*
11131127

@@ -1519,6 +1533,14 @@ gvim display. Here, statements are colored LightYellow instead of Yellow, and
15191533
conditionals are LightBlue for better distinction.
15201534

15211535

1536+
FORTH *forth.vim* *ft-forth-syntax*
1537+
1538+
Files matching "*.fs" could be F# or Forth. If the automatic detection
1539+
doesn't work for you, or you don't edit F# at all, use this in your
1540+
startup vimrc: >
1541+
:let filetype_fs = "forth"
1542+
1543+
15221544
FORTRAN *fortran.vim* *ft-fortran-syntax*
15231545

15241546
Default highlighting and dialect ~
@@ -1673,16 +1695,6 @@ as Fvwm2 configuration files, add the following: >
16731695
:au! BufNewFile,BufRead /etc/X11/fvwm2/* let b:fvwm_version = 2 |
16741696
\ set filetype=fvwm
16751697
1676-
If you'd like Vim to highlight all valid color names, tell it where to
1677-
find the color database (rgb.txt) on your system. Do this by setting
1678-
"rgb_file" to its location. Assuming your color database is located
1679-
in /usr/X11/lib/X11/, you should add the line >
1680-
1681-
:let rgb_file = "/usr/X11/lib/X11/rgb.txt"
1682-
1683-
to your .vimrc file.
1684-
1685-
16861698
GSP *gsp.vim* *ft-gsp-syntax*
16871699

16881700
The default coloring style for GSP pages is defined by |html.vim|, and
@@ -4830,16 +4842,28 @@ in their own color.
48304842
Doesn't work recursively, thus you can't use
48314843
":colorscheme" in a color scheme script.
48324844

4833-
To customize a color scheme use another name, e.g.
4845+
You have two options for customizing a color scheme.
4846+
For changing the appearance of specific colors, you
4847+
can redefine a color name before loading the scheme.
4848+
The desert scheme uses the khaki color for the cursor.
4849+
To use a darker variation of the same color: >
4850+
4851+
let v:colornames['khaki'] = '#bdb76b'
4852+
colorscheme desert
4853+
<
4854+
For further customization, such as changing
4855+
|:highlight-link| associations, use another name, e.g.
48344856
"~/.vim/colors/mine.vim", and use `:runtime` to load
48354857
the original color scheme: >
48364858
runtime colors/evening.vim
48374859
hi Statement ctermfg=Blue guifg=Blue
48384860
4839-
< Before the color scheme will be loaded the
4840-
|ColorSchemePre| autocommand event is triggered.
4841-
After the color scheme has been loaded the
4842-
|ColorScheme| autocommand event is triggered.
4861+
< Before the color scheme will be loaded all default
4862+
color list scripts (`colors/lists/default.vim`) will
4863+
be executed and then the |ColorSchemePre| autocommand
4864+
event is triggered. After the color scheme has been
4865+
loaded the |ColorScheme| autocommand event is
4866+
triggered.
48434867
For info about writing a color scheme file: >
48444868
:edit $VIMRUNTIME/colors/README.txt
48454869
@@ -4849,6 +4873,7 @@ in their own color.
48494873
:hi[ghlight] {group-name}
48504874
List one highlight group.
48514875

4876+
*highlight-clear*
48524877
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
48534878
highlighting for groups added by the user!
48544879
Uses the current value of 'background' to decide which
@@ -4862,7 +4887,9 @@ in their own color.
48624887

48634888
:hi[ghlight] [default] {group-name} {key}={arg} ..
48644889
Add a highlight group, or change the highlighting for
4865-
an existing group.
4890+
an existing group. If a given color name is not
4891+
recognized, each `colors/lists/default.vim` found on
4892+
|'runtimepath'| will be loaded.
48664893
See |highlight-args| for the {key}={arg} arguments.
48674894
See |:highlight-default| for the optional [default]
48684895
argument.
@@ -5143,8 +5170,35 @@ guisp={color-name} *highlight-guisp*
51435170
"gg" is the Green value
51445171
"bb" is the Blue value
51455172
All values are hexadecimal, range from "00" to "ff". Examples: >
5146-
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
5173+
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
5174+
<
5175+
If you are authoring a color scheme and use the same hexademical value
5176+
repeatedly, you can define a name for it in |v:colornames|. For
5177+
example: >
5178+
5179+
# provide a default value for this color but allow the user to
5180+
# override it.
5181+
:call extend(v:colornames, {'alt_turquoise': '#11f0c3'}, 'keep')
5182+
:highlight Comment guifg=alt_turquoise guibg=magenta
51475183
<
5184+
If you are using a color scheme that relies on named colors and you
5185+
would like to adjust the precise appearance of those colors, you can
5186+
do so by overriding the values in |v:colornames| prior to loading the
5187+
scheme: >
5188+
5189+
let v:colornames['alt_turquoise'] = '#22f0d3'
5190+
colorscheme alt
5191+
<
5192+
If you want to develop a color list that can be relied on by others,
5193+
it is best to prefix your color names. By convention these color lists
5194+
are placed in the colors/lists directory. You can see an example in
5195+
'$VIMRUNTIME/colors/lists/csscolors.vim'. This list would be sourced
5196+
by a color scheme using: >
5197+
5198+
:runtime colors/lists/csscolors.vim
5199+
:highlight Comment guifg=css_turquoise
5200+
<
5201+
51485202
*highlight-groups* *highlight-default*
51495203
These are the default highlighting groups. These groups are used by the
51505204
'highlight' option default. Note that the highlighting depends on the value
@@ -5205,6 +5259,10 @@ LineNrBelow Line number for when the 'relativenumber'
52055259
*hl-CursorLineNr*
52065260
CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt'
52075261
contains "number" or is "both", for the cursor line.
5262+
*hl-CursorLineSign*
5263+
CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
5264+
*hl-CursorLineFold*
5265+
CursorLineFold Like FoldColumn when 'cursorline' is set for the cursor line.
52085266
*hl-MatchParen*
52095267
MatchParen The character under the cursor or just before it, if it
52105268
is a paired bracket, and its match. |pi_paren.txt|
@@ -5431,7 +5489,7 @@ For Unix you can use the file ~/.vim/after/syntax/syncolor.vim. Example: >
54315489
else
54325490
highlight comment ctermfg=green guifg=green
54335491
endif
5434-
5492+
<
54355493
*E679*
54365494
Do make sure this syncolor.vim script does not use a "syntax on", set the
54375495
'background' option or uses a "colorscheme" command, because it results in an
@@ -5444,11 +5502,11 @@ depends on the color scheme file. See |:colorscheme|.
54445502
*syntax_cmd*
54455503
The "syntax_cmd" variable is set to one of these values when the
54465504
syntax/syncolor.vim files are loaded:
5447-
"on" ":syntax on" command. Highlight colors are overruled but
5505+
"on" `:syntax on` command. Highlight colors are overruled but
54485506
links are kept
5449-
"enable" ":syntax enable" command. Only define colors for groups that
5450-
don't have highlighting yet. Use ":syntax default".
5451-
"reset" ":syntax reset" command or loading a color scheme. Define all
5507+
"enable" `:syntax enable` command. Only define colors for groups that
5508+
don't have highlighting yet. Use `:highlight default` .
5509+
"reset" `:syntax reset` command or loading a color scheme. Define all
54525510
the colors.
54535511
"skip" Don't define colors. Used to skip the default settings when a
54545512
syncolor.vim file earlier in 'runtimepath' has already set

0 commit comments

Comments
 (0)