Fix memory leak in window controller
[MacVim.git] / runtime / colors / README.txt
blob0bd84842db696d714c078760080a6a896e990da8
1 README.txt for color scheme files
3 These files are used for the ":colorscheme" command.  They appear in the
4 Edit/Color Scheme menu in the GUI.
7 Hints for writing a color scheme file:
9 There are two basic ways to define a color scheme:
11 1. Define a new Normal color and set the 'background' option accordingly.
12         set background={light or dark}
13         highlight clear
14         highlight Normal ...
15         ...
17 2. Use the default Normal color and automatically adjust to the value of
18    'background'.
19         highlight clear Normal
20         set background&
21         highlight clear
22         if &background == "light"
23           highlight Error ...
24           ...
25         else
26           highlight Error ...
27           ...
28         endif
30 You can use ":highlight clear" to reset everything to the defaults, and then
31 change the groups that you want differently.  This also will work for groups
32 that are added in later versions of Vim.
33 Note that ":highlight clear" uses the value of 'background', thus set it
34 before this command.
35 Some attributes (e.g., bold) might be set in the defaults that you want
36 removed in your color scheme.  Use something like "gui=NONE" to remove the
37 attributes.
39 To see which highlight group is used where, find the help for
40 "highlight-groups" and "group-name".
42 You can use ":highlight" to find out the current colors.  Exception: the
43 ctermfg and ctermbg values are numbers, which are only valid for the current
44 terminal.  Use the color names instead.  See ":help cterm-colors".
46 The default color settings can be found in the source file src/syntax.c.
47 Search for "highlight_init".
49 If you think you have a color scheme that is good enough to be used by others,
50 please check the following items:
52 - Does it work in a color terminal as well as in the GUI?
53 - Is 'background' either used or appropriately set to "light" or "dark"?
54 - Try setting 'hlsearch' and searching for a pattern, is the match easy to
55   spot?
56 - Split a window with ":split" and ":vsplit".  Are the status lines and
57   vertical separators clearly visible?
58 - In the GUI, is it easy to find the cursor, also in a file with lots of
59   syntax highlighting?
60 - Do not use hard coded escape sequences, these will not work in other
61   terminals.  Always use color names or #RRGGBB for the GUI.