Mercurial > vim
annotate runtime/colors/README.txt @ 12281:2738b0cc5f64 v8.0.1020
patch 8.0.1020: when a timer calls getchar(1) input is overwritten
commit https://github.com/vim/vim/commit/0f0f230012f5a9beb6876158a17b432534836c6f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 30 18:52:56 2017 +0200
patch 8.0.1020: when a timer calls getchar(1) input is overwritten
Problem: When a timer calls getchar(1) input is overwritten.
Solution: Increment tb_change_cnt in inchar(). (closes https://github.com/vim/vim/issues/1940)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 30 Aug 2017 19:00:05 +0200 |
parents | 169a62d5bcb9 |
children | e265f0b93bb4 |
rev | line source |
---|---|
7 | 1 README.txt for color scheme files |
2 | |
3 These files are used for the ":colorscheme" command. They appear in the | |
4 Edit/Color Scheme menu in the GUI. | |
5 | |
6 | |
7 Hints for writing a color scheme file: | |
8 | |
9 There are two basic ways to define a color scheme: | |
10 | |
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 ... | |
16 | |
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 | |
29 | |
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. | |
38 | |
5555 | 39 In case you want to set 'background' depending on the colorscheme selected, |
40 this autocmd might be useful: | |
41 autocmd SourcePre */colors/blue_sky.vim set background=dark | |
42 Replace "blue_sky" with the name of the colorscheme. | |
43 | |
10319
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
44 In case you want to tweak a colorscheme after it was loaded, check out the |
5555 | 45 ColorScheme autocmd event. |
46 | |
10319
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
47 To customize a colorscheme use another name, e.g. "~/.vim/colors/mine.vim", |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
48 and use `:runtime` to load the original colorscheme: |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
49 " load the "evening" colorscheme |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
50 runtime colors/evening.vim |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
51 " change the color of statements |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
52 hi Statement ctermfg=Blue guifg=Blue |
169a62d5bcb9
commit https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Christian Brabandt <cb@256bit.org>
parents:
5555
diff
changeset
|
53 |
7 | 54 To see which highlight group is used where, find the help for |
55 "highlight-groups" and "group-name". | |
56 | |
57 You can use ":highlight" to find out the current colors. Exception: the | |
58 ctermfg and ctermbg values are numbers, which are only valid for the current | |
59 terminal. Use the color names instead. See ":help cterm-colors". | |
60 | |
61 The default color settings can be found in the source file src/syntax.c. | |
62 Search for "highlight_init". | |
63 | |
64 If you think you have a color scheme that is good enough to be used by others, | |
65 please check the following items: | |
66 | |
67 - Does it work in a color terminal as well as in the GUI? | |
1622 | 68 - Is "g:colors_name" set to a meaningful value? In case of doubt you can do |
69 it this way: | |
70 let g:colors_name = expand('<sfile>:t:r') | |
7 | 71 - Is 'background' either used or appropriately set to "light" or "dark"? |
72 - Try setting 'hlsearch' and searching for a pattern, is the match easy to | |
73 spot? | |
74 - Split a window with ":split" and ":vsplit". Are the status lines and | |
75 vertical separators clearly visible? | |
76 - In the GUI, is it easy to find the cursor, also in a file with lots of | |
77 syntax highlighting? | |
78 - Do not use hard coded escape sequences, these will not work in other | |
79 terminals. Always use color names or #RRGGBB for the GUI. |