diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-13 20:20:40 +0000 |
commit | 071d4279d6ab81b7187b48f3a0fc61e587b6db6c (patch) | |
tree | 221cbe3c40e043163c06f61c52a7ba2eb41e12ce /runtime/colors/README.txt | |
parent | b4210b3bc14e2918f153a7307530fbe6eba659e1 (diff) | |
download | vim-git-071d4279d6ab81b7187b48f3a0fc61e587b6db6c.tar.gz |
updated for version 7.0001v7.0001
Diffstat (limited to 'runtime/colors/README.txt')
-rw-r--r-- | runtime/colors/README.txt | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/runtime/colors/README.txt b/runtime/colors/README.txt new file mode 100644 index 000000000..0bd84842d --- /dev/null +++ b/runtime/colors/README.txt @@ -0,0 +1,61 @@ +README.txt for color scheme files + +These files are used for the ":colorscheme" command. They appear in the +Edit/Color Scheme menu in the GUI. + + +Hints for writing a color scheme file: + +There are two basic ways to define a color scheme: + +1. Define a new Normal color and set the 'background' option accordingly. + set background={light or dark} + highlight clear + highlight Normal ... + ... + +2. Use the default Normal color and automatically adjust to the value of + 'background'. + highlight clear Normal + set background& + highlight clear + if &background == "light" + highlight Error ... + ... + else + highlight Error ... + ... + endif + +You can use ":highlight clear" to reset everything to the defaults, and then +change the groups that you want differently. This also will work for groups +that are added in later versions of Vim. +Note that ":highlight clear" uses the value of 'background', thus set it +before this command. +Some attributes (e.g., bold) might be set in the defaults that you want +removed in your color scheme. Use something like "gui=NONE" to remove the +attributes. + +To see which highlight group is used where, find the help for +"highlight-groups" and "group-name". + +You can use ":highlight" to find out the current colors. Exception: the +ctermfg and ctermbg values are numbers, which are only valid for the current +terminal. Use the color names instead. See ":help cterm-colors". + +The default color settings can be found in the source file src/syntax.c. +Search for "highlight_init". + +If you think you have a color scheme that is good enough to be used by others, +please check the following items: + +- Does it work in a color terminal as well as in the GUI? +- Is 'background' either used or appropriately set to "light" or "dark"? +- Try setting 'hlsearch' and searching for a pattern, is the match easy to + spot? +- Split a window with ":split" and ":vsplit". Are the status lines and + vertical separators clearly visible? +- In the GUI, is it easy to find the cursor, also in a file with lots of + syntax highlighting? +- Do not use hard coded escape sequences, these will not work in other + terminals. Always use color names or #RRGGBB for the GUI. |