commit 531471759864194c8a699b77c0c8b1d835dc754b parent a730807d4ff624e4463ad471084c9fce4bf4af61 Author: Alex Balgavy <alex@balgavy.eu> Date: Sun, 8 Oct 2023 15:08:16 +0200 vim: color commands should exclude quotes Diffstat:
M | vim/plugin/color.vim | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vim/plugin/color.vim b/vim/plugin/color.vim @@ -1,2 +1,2 @@ -command! ColorDarken if color#Test(expand('<cword>')) | exe "normal! \"_c/\\>/e<CR>" . color#Darken(expand('<cword>')) . "<esc>F#" | endif -command! ColorLighten if color#Test(expand('<cword>')) | exe "normal! \"_c/\\>/e<CR>" . color#Lighten(expand('<cword>')) . "<esc>F#" | endif +command! ColorDarken if color#Test(expand('<cword>')) | exe "normal! \"_c/[a-fA-F0-9]*/e<CR>" . color#Darken(expand('<cword>')) . "<esc>F#" | endif +command! ColorLighten if color#Test(expand('<cword>')) | exe "normal! \"_c/[a-fA-F0-9]*/e<CR>" . color#Lighten(expand('<cword>')) . "<esc>F#" | endif