Mercurial > vim
comparison runtime/doc/eval.txt @ 34278:e67eafbceca9
runtime(colors): color names in the v:colornames dict should be lower cased
Commit: https://github.com/vim/vim/commit/0f4054feb66ea55414f97add63b3070d7d7b5295
Author: Christian Brabandt <cb@256bit.org>
Date: Mon Feb 5 10:30:01 2024 +0100
runtime(colors): color names in the v:colornames dict should be lower cased
Vim will lookup color names from the v:colornames dictionary by its
lower case color name. So when sourcing the v:colornames dictionary,
make sure to convert upper case color names to lower case.
Also, while at it, mention in the documentation, that the dictionary
should contain lower case names only.
fixes: #13976
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 05 Feb 2024 10:45:05 +0100 |
parents | 8f94a72dfbed |
children | 6df143135376 |
comparison
equal
deleted
inserted
replaced
34277:0386bb1f6e2f | 34278:e67eafbceca9 |
---|---|
1 *eval.txt* For Vim version 9.1. Last change: 2024 Jan 14 | 1 *eval.txt* For Vim version 9.1. Last change: 2024 Feb 05 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
2003 See |multi-lang|. | 2003 See |multi-lang|. |
2004 | 2004 |
2005 *v:colornames* | 2005 *v:colornames* |
2006 v:colornames A dictionary that maps color names to hex color strings. These | 2006 v:colornames A dictionary that maps color names to hex color strings. These |
2007 color names can be used with the |highlight-guifg|, | 2007 color names can be used with the |highlight-guifg|, |
2008 |highlight-guibg|, and |highlight-guisp| parameters. Updating | 2008 |highlight-guibg|, and |highlight-guisp| parameters. |
2009 an entry in v:colornames has no immediate effect on the syntax | 2009 |
2010 highlighting. The highlight commands (probably in a | 2010 The key values in the dictionary (the color names) should be |
2011 lower cased, because Vim looks up a color by its lower case | |
2012 name. | |
2013 | |
2014 Updating an entry in v:colornames has no immediate effect on | |
2015 the syntax highlighting. The highlight commands (probably in a | |
2011 colorscheme script) need to be re-evaluated in order to use | 2016 colorscheme script) need to be re-evaluated in order to use |
2012 the updated color values. For example: > | 2017 the updated color values. For example: > |
2013 | 2018 |
2014 :let v:colornames['fuscia'] = '#cf3ab4' | 2019 :let v:colornames['fuscia'] = '#cf3ab4' |
2015 :let v:colornames['mauve'] = '#915f6d' | 2020 :let v:colornames['mauve'] = '#915f6d' |