annotate runtime/colors/check_colors.vim @ 13039:e265f0b93bb4 v8.0.1395

patch 8.0.1395: it is not easy to see if a colorscheme is well written commit https://github.com/vim/vim/commit/200d0e36bc5384beb9dc76ac75806ac0aecf84ac Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 16 18:53:35 2017 +0100 patch 8.0.1395: it is not easy to see if a colorscheme is well written Problem: It is not easy to see if a colorscheme is well written. Solution: Add a script that checks for common mistakes. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Dec 2017 19:00:06 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13039
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " This script tests a color scheme for some errors. Load the scheme and source
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " this script. e.g. :e colors/desert.vim | :so test_colors.vim
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Will output possible errors.
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 let s:save_cpo= &cpo
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 set cpo&vim
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 func! Test_check_colors()
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 call cursor(1,1)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 let err={}
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 " 1) Check g:colors_name is existing
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 if !search('\<\%(g:\)\?colors_name\>', 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 let err['colors_name'] = 'g:colors_name not set'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 else
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 let err['colors_name'] = 'OK'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 " 2) Check for some well-defined highlighting groups
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 " Some items, check several groups, e.g. Diff, Spell
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 let hi_groups = ['ColorColumn', 'Diff', 'ErrorMsg', 'Folded',
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 \ 'FoldColumn', 'IncSearch', 'LineNr', 'ModeMsg', 'MoreMsg', 'NonText',
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 \ 'Normal', 'Pmenu', 'Todo', 'Search', 'Spell', 'StatusLine', 'TabLine',
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 \ 'Title', 'Visual', 'WarningMsg', 'WildMenu']
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 let groups={}
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 for group in hi_groups
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 if search('\c@suppress\s\+'.group, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 " skip check, if the script contains a line like
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 " @suppress Visual:
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 let groups[group] = 'Ignoring '.group
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 continue
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 if !search('hi\%[ghlight] \+'.group, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 let groups[group] = 'No highlight definition for '.group
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 continue
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 if !search('hi\%[ghlight] \+'.group. '.*fg=', 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 let groups[group] = 'Missing foreground color for '.group
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 continue
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 if search('hi\%[ghlight] \+'.group. '.*guibg=', 'cnW') &&
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 \ !search('hi\%[ghlight] \+'.group. '.*ctermbg=', 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 let groups[group] = 'Missing bg terminal color for '.group
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 continue
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 call search('hi\%[ghlight] \+'.group, 'cW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 " only check in the current line
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 if !search('guifg', 'cnW', line('.')) || !search('ctermfg', 'cnW', line('.'))
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 " do not check for background colors, they could be intentionally left out
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 let groups[group] = 'Missing fg definition for '.group
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 call cursor(1,1)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 endfor
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 let err['highlight'] = groups
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 " 3) Check, that it does not set background highlighting
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 " Doesn't ':hi Normal ctermfg=253 ctermfg=233' also set the background sometimes?
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 let bg_set='\(set\?\|setl\(ocal\)\?\) .*\(background\|bg\)=\(dark\|light\)'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 let bg_let='let \%([&]\%([lg]:\)\?\)\%(background\|bg\)\s*=\s*\([''"]\?\)\w\+\1'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 let bg_pat='\%('.bg_set. '\|'.bg_let.'\)'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 let line=search(bg_pat, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 if search(bg_pat, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 exe line
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 if search('hi \U\w\+\s\+\S', 'cbnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 let err['background'] = 'Should not set background option after :hi statement'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 else
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 let err['background'] = 'OK'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 call cursor(1,1)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 " 4) Check, that t_Co is checked
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 let pat = '[&]t_Co\s*[<>=]=\?\s*\d\+'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 if !search(pat, 'ncW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 let err['t_Co'] = 'Does not check terminal for capable colors'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 " 5) Initializes correctly, e.g. should have a section like
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 " hi clear
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 " if exists("syntax_on")
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 " syntax reset
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 " endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 let pat='hi\%[ghlight]\s*clear\n\s*if\s*exists(\([''"]\)syntax_on\1)\n\s*syn\%[tax]\s*reset\n\s*endif'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 if !search(pat, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 let err['init'] = 'No initialization'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 " 6) Does not use :syn on
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 if search('syn\%[tax]\s\+on', 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 let err['background'] = 'Should not issue :syn on'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 " 7) Does not define filetype specfic groups like vimCommand, htmlTag,
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 let hi_groups = ['vim', 'html', 'python', 'sh', 'ruby']
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 for group in hi_groups
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 let pat='\Chi\%[ghlight]\s*\zs'.group.'\w\+\>'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 if search(pat, 'cnW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 let line = search(pat, 'cW')
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 let err['filetype'] = get(err, 'filetype', 'Should not define: ') . matchstr(getline('.'), pat). ' '
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 call cursor(1,1)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 endfor
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 let g:err = err
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 " print Result
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 call Result(err)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 endfu
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 fu! Result(err)
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 let do_roups = 0
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 echohl Title|echomsg "---------------"|echohl Normal
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 for key in sort(keys(a:err))
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113 if key is# 'highlight'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 let do_groups = 1
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 continue
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 else
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117 if a:err[key] !~ 'OK'
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 echohl Title
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 echomsg printf("%15s: %s", key, a:err[key])
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 echohl Normal
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123 endfor
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 echohl Title|echomsg "---------------"|echohl Normal
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125 if do_groups
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126 echohl Title | echomsg "Groups" | echohl Normal
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
127 for v1 in sort(keys(a:err['highlight']))
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128 echomsg printf("%25s: %s", v1, a:err['highlight'][v1])
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 endfor
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 endif
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131 endfu
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 call Test_check_colors()
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 let &cpo = s:save_cpo
e265f0b93bb4 patch 8.0.1395: it is not easy to see if a colorscheme is well written
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 unlet s:save_cpo