I'm trying to debug my Vimrc config files but I can't find the file where the error is coming from, is there a way to find the file that the line is coming from?
For example, I'm given this error:
Error detected while processing function <SNR>28_HL: line 43: E254: Cannot allocate color 0 E421: Color name or number not recognized: ctermbg= gui=NONE cterm=NONE
This doesn't tell me where the file that the error is occuring is, I have tried doing
vim -V9myvim.log and rooting for the error which gives me this:
But this isn't that helpful because before it was
<SNR>32_HL, then I removed tabular (which was the last loaded plugin before the error) and it change to
Is the error in
Searching for "/Users/thermatix/.vim/after/syntax/syncolor.vim"?
Can't be because there is no after folder.
I also tried doing
grep -r 'ctermbg= gui=NONE cterm=NONE' .vim/ but that found nothing, and grep-ing for the individual attributes found nothing that seem to be related to the error.
I've also tried using
vim -D to try and step through but again, it seems to jump lines till the error happens without actually staging where the error is, so I can't tell where the problem lies, you just get this:
Entering Debug mode. Type "cont" to continue. /Users/thermatix/.vimrc line 1: so ~/.vim/vimrc.vim > >n Error detected while processing function <SNR>28_HL: line 43: E254: Cannot allocate color 0 E421: Color name or number not recognized: ctermbg= gui=NONE cterm=NONE /Users/thermatix/.vimrc line 2: End of sourced file >
So how do I find where the error is coming from? I mean, telling me the line number is all well and good but it's useless without the file that it's coming from.
If you find the need, my vim config files can be found here.