From 72bec72b64d1728c2d2b7378ecb70a92c9a0ec07 Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Sun, 3 Mar 2019 00:50:36 +0100 Subject: [PATCH 1/2] Remove the setting of termguicolors A check of the setting of termguicolors will be added, but from now on, the user will have to set this option. --- colors/odyssey.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/colors/odyssey.vim b/colors/odyssey.vim index 55bce8b..2399197 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -18,7 +18,6 @@ " Bootstrap {{{ " TODO Improve the bootstrap process ;-) -set termguicolors let s:colors = {} " }}} From 1afe5384449d6b95fabcca42f5973f6714c815ab Mon Sep 17 00:00:00 2001 From: Ludovic Koenig Date: Sun, 3 Mar 2019 14:53:31 +0100 Subject: [PATCH 2/2] 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'. --- colors/odyssey.vim | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/colors/odyssey.vim b/colors/odyssey.vim index 2399197..22479f6 100644 --- a/colors/odyssey.vim +++ b/colors/odyssey.vim @@ -15,9 +15,24 @@ " Maintainer: Ludovic Koenig " 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 = {} " }}}