Mercurial > vim
comparison runtime/syntax/colortest.vim @ 671:83a006f81bac v7.0199
updated for version 7.0199
author | vimboss |
---|---|
date | Thu, 16 Feb 2006 22:11:02 +0000 |
parents | 3fc0f57ecb91 |
children | e649c78407e6 |
comparison
equal
deleted
inserted
replaced
670:f892bda292a8 | 671:83a006f81bac |
---|---|
1 " Vim script for testing colors | 1 " Vim script for testing colors |
2 " Maintainer: Bram Moolenaar <Bram@vim.org> | 2 " Maintainer: Bram Moolenaar <Bram@vim.org> |
3 " Contributors: Rafael Garcia-Suarez, Charles Campbell | 3 " Contributors: Rafael Garcia-Suarez, Charles Campbell |
4 " Last Change: 2001 Jul 28 | 4 " Last Change: 2006 Feb 16 |
5 | 5 |
6 " edit this file, then do ":source %", and check if the colors match | 6 " edit this file, then do ":source %", and check if the colors match |
7 | 7 |
8 " black black_on_white white_on_black | 8 " black black_on_white white_on_black |
9 " black_on_black black_on_black | 9 " black_on_black black_on_black |
50 " lightmagenta lightmagenta_on_white white_on_lightmagenta | 50 " lightmagenta lightmagenta_on_white white_on_lightmagenta |
51 " lightmagenta_on_black black_on_lightmagenta | 51 " lightmagenta_on_black black_on_lightmagenta |
52 " lightcyan lightcyan_on_white white_on_lightcyan | 52 " lightcyan lightcyan_on_white white_on_lightcyan |
53 " lightcyan_on_black black_on_lightcyan | 53 " lightcyan_on_black black_on_lightcyan |
54 | 54 |
55 " Open this file in a window if it isn't edited yet. | |
56 " Use the current window if it's empty. | |
57 if &mod || line('$') != 1 || getline(1) != '' | |
58 new | |
59 endif | |
60 if expand('%:p') != expand('<sfile>:p') | |
61 exe "edit " . expand('<sfile>') | |
62 endif | |
63 | |
55 syn clear | 64 syn clear |
56 8 | 65 8 |
57 while search("_on_", "W") < 55 | 66 while search("_on_", "W") < 55 |
58 let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "") | 67 let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "") |
59 let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "") | 68 let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "") |
60 exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2 | 69 exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2 |
61 exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2 | 70 exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2 |
62 endwhile | 71 endwhile |
63 8,55g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| | 72 8,54g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>") |
64 \ exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>") | |
65 nohlsearch | 73 nohlsearch |