Merge branch 'hack/autopaste'
[vim-kana.git] / runtime / syntax / colortest.vim
blob377eba98fe48f435a2ed46bf5a681115fff69520
1 " Vim script for testing colors
2 " Maintainer:   Bram Moolenaar <Bram@vim.org>
3 " Contributors: Rafael Garcia-Suarez, Charles Campbell
4 " Last Change:  2006 Feb 20
6 " edit this file, then do ":source %", and check if the colors match
8 " black         black_on_white                          white_on_black
9 "                               black_on_black          black_on_black
10 " darkred       darkred_on_white                        white_on_darkred
11 "                               darkred_on_black        black_on_darkred
12 " darkgreen     darkgreen_on_white                      white_on_darkgreen
13 "                               darkgreen_on_black      black_on_darkgreen
14 " brown         brown_on_white                          white_on_brown
15 "                               brown_on_black          black_on_brown
16 " darkblue      darkblue_on_white                       white_on_darkblue
17 "                               darkblue_on_black       black_on_darkblue
18 " darkmagenta   darkmagenta_on_white                    white_on_darkmagenta
19 "                               darkmagenta_on_black    black_on_darkmagenta
20 " darkcyan      darkcyan_on_white                       white_on_darkcyan
21 "                               darkcyan_on_black       black_on_darkcyan
22 " lightgray     lightgray_on_white                      white_on_lightgray
23 "                               lightgray_on_black      black_on_lightgray
24 " darkgray      darkgray_on_white                       white_on_darkgray
25 "                               darkgray_on_black       black_on_darkgray
26 " red           red_on_white                            white_on_red
27 "                               red_on_black            black_on_red
28 " green         green_on_white                          white_on_green
29 "                               green_on_black          black_on_green
30 " yellow        yellow_on_white                         white_on_yellow
31 "                               yellow_on_black         black_on_yellow
32 " blue          blue_on_white                           white_on_blue
33 "                               blue_on_black           black_on_blue
34 " magenta       magenta_on_white                        white_on_magenta
35 "                               magenta_on_black        black_on_magenta
36 " cyan          cyan_on_white                           white_on_cyan
37 "                               cyan_on_black           black_on_cyan
38 " white         white_on_white                          white_on_white
39 "                               white_on_black          black_on_white
40 " grey          grey_on_white                           white_on_grey
41 "                               grey_on_black           black_on_grey
42 " lightred      lightred_on_white                       white_on_lightred
43 "                               lightred_on_black       black_on_lightred
44 " lightgreen    lightgreen_on_white                     white_on_lightgreen
45 "                               lightgreen_on_black     black_on_lightgreen
46 " lightyellow   lightyellow_on_white                    white_on_lightyellow
47 "                               lightyellow_on_black    black_on_lightyellow
48 " lightblue     lightblue_on_white                      white_on_lightblue
49 "                               lightblue_on_black      black_on_lightblue
50 " lightmagenta  lightmagenta_on_white                   white_on_lightmagenta
51 "                               lightmagenta_on_black   black_on_lightmagenta
52 " lightcyan     lightcyan_on_white                      white_on_lightcyan
53 "                               lightcyan_on_black      black_on_lightcyan
55 " Open this file in a window if it isn't edited yet.
56 " Use the current window if it's empty.
57 if expand('%:p') != expand('<sfile>:p')
58   if &mod || line('$') != 1 || getline(1) != ''
59     exe "new " . expand('<sfile>')
60   else
61     exe "edit " . expand('<sfile>')
62   endif
63 endif
65 syn clear
67 while search("_on_", "W") < 55
68   let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "")
69   let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "")
70   exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2
71   exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2
72 endwhile
73 8,54g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>")
74 nohlsearch