home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim60.zip / vim60rt2.zip / vim / vim60 / syntax / colortest.vim < prev    next >
Encoding:
Text File  |  2001-09-26  |  2.8 KB  |  66 lines

  1. " Vim script for testing colors
  2. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  3. " Contributors:    Rafael Garcia-Suarez, Charles Campbell
  4. " Last Change:    2001 Jul 28
  5.  
  6. " edit this file, then do ":source %", and check if the colors match
  7.  
  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
  54.  
  55. syn clear
  56. 8
  57. while search("_on_", "W") < 55
  58.   let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "")
  59.   let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "")
  60.   exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2
  61.   exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2
  62. endwhile
  63. 8,55g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")|
  64.     \ exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>")
  65. nohlsearch
  66.