comparison runtime/doc/syntax.txt @ 26057:92c424550367 v8.2.3562

patch 8.2.3562: cannot add color names Commit: https://github.com/vim/vim/commit/e30d10253fa634c4f60daa798d029245f4eed393 Author: Drew Vogel <dvogel@github> Date: Sun Oct 24 20:35:07 2021 +0100 patch 8.2.3562: cannot add color names Problem: Cannot add color names. Solution: Add the v:colornames dictionary. (Drew Vogel, closes https://github.com/vim/vim/issues/8761)
author Bram Moolenaar <Bram@vim.org>
date Sun, 24 Oct 2021 21:45:04 +0200
parents d4faa2c5211b
children c544eacaf066
comparison
equal deleted inserted replaced
26056:977bbbf36908 26057:92c424550367
5141 The format is "#rrggbb", where 5141 The format is "#rrggbb", where
5142 "rr" is the Red value 5142 "rr" is the Red value
5143 "gg" is the Green value 5143 "gg" is the Green value
5144 "bb" is the Blue value 5144 "bb" is the Blue value
5145 All values are hexadecimal, range from "00" to "ff". Examples: > 5145 All values are hexadecimal, range from "00" to "ff". Examples: >
5146 :highlight Comment guifg=#11f0c3 guibg=#ff00ff 5146 :highlight Comment guifg=#11f0c3 guibg=#ff00ff
5147 < 5147 <
5148 If you are authoring a color scheme and use the same hexademical value
5149 repeatedly, you can define a name for it in |v:colornames|. For
5150 example: >
5151
5152 # provide a default value for this color but allow the user to
5153 # override it.
5154 :call extend(v:colornames, {'alt_turquoise': '#11f0c3'}, 'keep')
5155 :highlight Comment guifg=alt_turquoise guibg=magenta
5156 <
5157 If you are using a color scheme that relies on named colors and you
5158 would like to adjust the precise appearance of those colors, you can
5159 do so by overriding the values in |v:colornames| prior to loading the
5160 scheme: >
5161
5162 let v:colornames['alt_turquoise'] = '#22f0d3'
5163 colorscheme alt
5164 <
5165 If you want to develop a color list that can be relied on by others,
5166 it is best to prefix your color names. By convention these color lists
5167 are placed in the colors/lists directory. You can see an example in
5168 '$VIMRUNTIME/colors/lists/csscolors.vim'. This list would be sourced
5169 by a color scheme using: >
5170
5171 :runtime colors/lists/csscolors.vim
5172 :highlight Comment guifg=css_turquoise
5173 <
5174
5148 *highlight-groups* *highlight-default* 5175 *highlight-groups* *highlight-default*
5149 These are the default highlighting groups. These groups are used by the 5176 These are the default highlighting groups. These groups are used by the
5150 'highlight' option default. Note that the highlighting depends on the value 5177 'highlight' option default. Note that the highlighting depends on the value
5151 of 'background'. You can see the current settings with the ":highlight" 5178 of 'background'. You can see the current settings with the ":highlight"
5152 command. 5179 command.