annotate runtime/colors/README.txt @ 31796:e2fa5867a7bd v9.0.1230

patch 9.0.1230: Apache thrift files are not recognized Commit: https://github.com/vim/vim/commit/f3da4c8427b1b12d7aaffa307ec085ca97ea9ad9 Author: Amaan Qureshi <amaanq12@gmail.com> Date: Sun Jan 22 18:16:44 2023 +0000 patch 9.0.1230: Apache thrift files are not recognized Problem: Apache thrift files are not recognized. Solution: Add a pattern for thrift files. (Amaan Qureshi, closes https://github.com/vim/vim/issues/11859)
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Jan 2023 19:30:04 +0100
parents 57c9377b9c62
children d6dde6229b36
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 README.txt for color scheme files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
3 These files are used for the `:colorscheme` command. They appear in the
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
4 "Edit/Color Scheme" menu in the GUI.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
6 The colorschemes were updated for the Vim 9 release. If you don't like the
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
7 changes you can find the old ones here:
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
8 https://github.com/vim/colorschemes/tree/master/legacy_colors
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
9
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 Hints for writing a color scheme file:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 There are two basic ways to define a color scheme:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
15 1. Define a new Normal color and set the 'background' option accordingly. >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 set background={light or dark}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 highlight clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 highlight Normal ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 2. Use the default Normal color and automatically adjust to the value of
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
23 'background'. >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
24
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 highlight clear Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 set background&
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 highlight clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if &background == "light"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 highlight Error ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 highlight Error ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
36 You can use `:highlight clear` to reset everything to the defaults, and then
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
37 change the groups that you want differently. This will also work for groups
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 that are added in later versions of Vim.
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
39 Note that `:highlight clear` uses the value of 'background', thus set it
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 before this command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 Some attributes (e.g., bold) might be set in the defaults that you want
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 removed in your color scheme. Use something like "gui=NONE" to remove the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 attributes.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
5555
7818ca6de3d0 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
45 In case you want to set 'background' depending on the colorscheme selected,
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
46 this autocmd might be useful: >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
47
5555
7818ca6de3d0 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
48 autocmd SourcePre */colors/blue_sky.vim set background=dark
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
49
5555
7818ca6de3d0 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
50 Replace "blue_sky" with the name of the colorscheme.
7818ca6de3d0 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
51
10319
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
52 In case you want to tweak a colorscheme after it was loaded, check out the
13810
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
53 ColorScheme autocommand event.
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
54
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
55 To clean up just before loading another colorscheme, use the ColorSchemePre
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
56 autocommand event. For example: >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
57
13810
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
58 let g:term_ansi_colors = ...
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
59 augroup MyColorscheme
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
60 au!
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
61 au ColorSchemePre * unlet g:term_ansi_colors
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
62 au ColorSchemePre * au! MyColorscheme
cad480bac9e1 patch 8.0.1777: cannot cleanup before loading another colorscheme
Christian Brabandt <cb@256bit.org>
parents: 13049
diff changeset
63 augroup END
5555
7818ca6de3d0 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1622
diff changeset
64
10319
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
65 To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim",
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
66 and use ":runtime" to load the original colorscheme: >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
67
10319
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
68 " load the "evening" colorscheme
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
69 runtime colors/evening.vim
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
70 " change the color of statements
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
71 hi Statement ctermfg=Blue guifg=Blue
169a62d5bcb9 commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents: 5555
diff changeset
72
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
73 To see which highlight group is used where, see `:help highlight-groups` and
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
74 `:help group-name` .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 You can use ":highlight" to find out the current colors. Exception: the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 ctermfg and ctermbg values are numbers, which are only valid for the current
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
78 terminal. Use the color names instead for better portability. See
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
79 `:help cterm-colors` .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
81 The default color settings can be found in the source file src/syntax.c.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 Search for "highlight_init".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 If you think you have a color scheme that is good enough to be used by others,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 please check the following items:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
13857
e751b5c9dff3 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13810
diff changeset
87 - Source the $VIMRUNTIME/colors/tools/check_colors.vim script to check for
e751b5c9dff3 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13810
diff changeset
88 common mistakes.
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
89
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
90 - Does it work in a color terminal as well as in the GUI? Is it consistent?
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
91
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
92 - Is "g:colors_name" set to a meaningful value? In case of doubt you can do
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
93 it this way: >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
94
1622
149d8b46404c updated for version 7.2a
vimboss
parents: 7
diff changeset
95 let g:colors_name = expand('<sfile>:t:r')
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
96
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 - Is 'background' either used or appropriately set to "light" or "dark"?
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
98
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 - Try setting 'hlsearch' and searching for a pattern, is the match easy to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 spot?
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
101
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 - Split a window with ":split" and ":vsplit". Are the status lines and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 vertical separators clearly visible?
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
104
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 - In the GUI, is it easy to find the cursor, also in a file with lots of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syntax highlighting?
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
107
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
108 - In general, test your color scheme against as many filetypes, Vim features,
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
109 environments, etc. as possible.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
110
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 - Do not use hard coded escape sequences, these will not work in other
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
112 terminals. Always use #RRGGBB for the GUI.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
113
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
114 - When targetting 8-16 colors terminals, don't count on "darkblue" to be blue
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
115 and dark, or on "2" to be even vaguely reddish. Names are more portable
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
116 than numbers, though.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
117
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
118 - When targetting 256 colors terminals, prefer colors 16-255 to colors 0-15
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
119 for the same reason.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
120
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
121 - Typographic attributes (bold, italic, underline, reverse, etc.) are not
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
122 universally supported. Don't count on any of them.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
123
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
124 - Is "g:terminal_ansi_colors" set to a list of 16 #RRGGBB values?
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
125
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
126 - Try to keep your color scheme simple by avoiding unnecessary logic and
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
127 refraining from adding options. The best color scheme is one that only
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
128 requires: >
28862
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
129
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
130 colorscheme foobar
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
131
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
132 The color schemes distributed with Vim are built with lifepillar/colortemplate
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
133 (https://github.com/lifepillar/vim-colortemplate). It is therefore highly
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
134 recommended.
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
135
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
136 If you would like your color scheme to be distributed with Vim, make sure
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
137 that:
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
138
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
139 - it satisfies the guidelines above,
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
140 - it was made with colortemplate,
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
141
82244cfc4694 Update runtime files, new color schemes
Bram Moolenaar <Bram@vim.org>
parents: 26057
diff changeset
142 and join us at vim/colorschemes: (https://github.com/vim/colorschemes).
28933
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
143
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
144
57c9377b9c62 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 28862
diff changeset
145 vim: set ft=help :