Error when sourcing a colorscheme if 'compatible' is set
romainl opened this issue · 1 comments
romainl commented
See vim/colorschemes#55:
When 'compatible'
is set, 'cpoptions'
contains C
and according to :help 'cpoptions'
:
C Do not concatenate sourced lines that start with a
backslash. See |line-continuation|.
Therefore, when sourcing a color scheme file, lines like these throw an error:
let g:terminal_ansi_colors = ['#ffffff', '#0000ff', '#00cd00', '#cd00cd',
\ '#008b8b', '#0000ff', '#ff1493', '#bcbcbc', '#ee0000', '#0000ff',
\ '#00cd00', '#cd00cd', '#008b8b', '#0000ff', '#ff1493', '#000000']
Now you might wonder "Why on earth would anyone set 'compatible'
in 2021?". Good question. A likely scenario is when starting Vim without a vimrc, for example with vim -u NONE
. Without a vimrc, 'compatible'
is set by default. So doing something like this this gives an error:
vim -u NONE -c "colorscheme blue"
lifepillar commented
Thanks for reporting! This should be fixed in the current master.