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:
+17
-2
@@ -15,9 +15,24 @@
|
|||||||
" Maintainer: Ludovic Koenig <ludovic.koenig@gmail.com>
|
" Maintainer: Ludovic Koenig <ludovic.koenig@gmail.com>
|
||||||
" License: MIT
|
" 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 = {}
|
let s:colors = {}
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|||||||
Reference in New Issue
Block a user