annotate runtime/syntax/syncolor.vim @ 21604:d9c45474cac1 v8.2.1352

patch 8.2.1352: Vim9: no error for shadowing a script-local function Commit: https://github.com/vim/vim/commit/ad486a0f0dd194826fdb733516bf0f35382c9dd7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 1 23:22:18 2020 +0200 patch 8.2.1352: Vim9: no error for shadowing a script-local function Problem: Vim9: no error for shadowing a script-local function by a nested function. Solution: Check for script-local function. (closes #6586)
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Aug 2020 23:30:03 +0200
parents 7be3663e2f2b
children 4027cefc2aab
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 syntax support file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Bram Moolenaar <Bram@vim.org>
19404
7be3663e2f2b Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
3 " Last Change: 2020 Feb 13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " This file sets up the default methods for highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " It is loaded from "synload.vim" and from Vim for ":syntax reset".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Also used from init_highlight().
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if !exists("syntax_cmd") || syntax_cmd == "on"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " ":syntax on" works like in Vim 5.7: set colors but keep links
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 command -nargs=* SynColor hi <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 command -nargs=* SynLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if syntax_cmd == "enable"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " ":syntax enable" keeps any existing colors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 command -nargs=* SynColor hi def <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 command -nargs=* SynLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 elseif syntax_cmd == "reset"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " ":syntax reset" resets all colors to the default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 command -nargs=* SynColor hi <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 command -nargs=* SynLink hi! link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " User defined syncolor file has already set the colors.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Many terminals can only use six different colors (plus black and white).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Therefore the number of colors used is kept low. It doesn't look nice with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " too many colors anyway.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Careful with "cterm=bold", it changes the color to bright for some terminals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " There are two sets of defaults: for a dark and a light background.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 if &background == "dark"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE
19404
7be3663e2f2b Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
46 " #6a5acd is SlateBlue
7be3663e2f2b Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
47 SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=#6a5acd guibg=NONE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE
19404
7be3663e2f2b Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
50 " #6a0dad is Purple
7be3663e2f2b Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 7
diff changeset
51 SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=#6a0dad guibg=NONE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " Common groups that link to default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " You can specify other highlighting easily.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 SynLink String Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 SynLink Character Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 SynLink Number Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 SynLink Boolean Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 SynLink Float Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 SynLink Function Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 SynLink Conditional Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 SynLink Repeat Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 SynLink Label Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 SynLink Operator Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 SynLink Keyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 SynLink Exception Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 SynLink Include PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 SynLink Define PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 SynLink Macro PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 SynLink PreCondit PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 SynLink StorageClass Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 SynLink Structure Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 SynLink Typedef Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 SynLink Tag Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 SynLink SpecialChar Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 SynLink Delimiter Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 SynLink SpecialComment Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 SynLink Debug Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 delcommand SynColor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 delcommand SynLink