vim / colorschemes

colorschemes for Vim
289 stars 23 forks source link

Applied line-continuation fix as per https://github.com/vim/colorschemes/issues/55 #56

Closed romainl closed 3 years ago

romainl commented 3 years ago

The line continuations are removed but there are lots of other changes introduced as well. This needs more attention.

lifepillar commented 3 years ago

From what I see, the remaining changes are all inside comments (mostly updated timestamps).

gdupras commented 3 years ago

Instead of removing line continuations, &cpoptions could be set to Vim default then later the old value could be restored, like this:

" Near the beginning of the file.
let s:cpo_save = &cpo
set cpo&vim

" Code with line continuations.

" Near the end of the file.
let &cpo = s:cpo_save
unlet s:cpo_save

There is an example of this in runtime/ftplugin/vim.vim.

This will introduce fewer changes to the colorscheme files and should guard against other potential issues that might be caused by whatever &cpo is set to.