Add the initialisation step

The initialisation step consists in cleaning the highlights and the
syntax from previous schemes, and setting the background accordingly.

Plus, the variables used within the script are also initialized.

It must be noted that the colorscheme is only defined for the GUI and
for versions of Vim that has the 'termguicolors' option set. In addition
the version must be greater than '580'.
This commit is contained in:
Ludovic Koenig
2019-03-03 14:53:31 +01:00
parent 72bec72b64
commit 1afe538444
+17 -2
View File
@@ -15,9 +15,24 @@
" Maintainer: Ludovic Koenig <ludovic.koenig@gmail.com>
" License: MIT
"
" Bootstrap {{{
" Initialisation {{{
if !(has('termguicolors') && &termguicolors) && !has('gui_running')
finish
endif
if v:version > 580
set background=dark
highlight clear
if exists('syntax_on')
syntax reset
endif
else
finish
endif
let g:colors_name = 'odyssey'
" TODO Improve the bootstrap process ;-)
let s:colors = {}
" }}}