From 82551620059b055d7ed866cf7af3e8b6f1b891a4 Mon Sep 17 00:00:00 2001 From: Akshay Hegde Date: Sat, 21 May 2016 20:59:58 -0700 Subject: [PATCH] Add options to tweak spacegray Adds italic comment support and the ability to use underline instead of the highlight search, which makes it much more pleasing to look at, in my opinion. Note that the italic comment support in terminal vim requires terminal support. --- README.md | 14 ++++++++++++++ colors/spacegray.vim | 20 ++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1606da..f3abda7 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,20 @@ Spacegray is a colorscheme for Vim loosely modeled after the [spacegray](https://github.com/zdne/spacegray-xcode) theme for Xcode. +## Options + +You can tweak Spacegray by enabling the following disabled options: + +1. Underlined Search: Underline search text instead of using highlight color. + Put the following in your `~/.vimrc` to enable it: + + > `let g:spacegray_underline_search = 1` + +2. Italic Comments: Italicize comments (_note_: vim requires terminal support). + Put the following in your `~/.vimrc` to enable it: + + > `let g:spacegray_italicize_comments = 1` + ## Screenshots Here are a few screenshots of Spacegray: diff --git a/colors/spacegray.vim b/colors/spacegray.vim index a8c5343..a7f16a7 100644 --- a/colors/spacegray.vim +++ b/colors/spacegray.vim @@ -11,6 +11,14 @@ if exists('syntax_on') syntax reset endif +if !exists('g:spacegray_underline_search') + let g:spacegray_underline_search = 0 +endif + +if !exists('g:spacegray_italicize_comments') + let g:spacegray_italicize_comments = 0 +endif + set background=dark let colors_name = 'spacegray' @@ -18,7 +26,11 @@ let colors_name = 'spacegray' hi Normal ctermbg=233 ctermfg=250 guibg=#111314 guifg=#B3B8C4 cterm=NONE gui=NONE hi Conceal ctermbg=NONE ctermfg=250 guibg=NONE guifg=#B3B8C4 cterm=NONE gui=NONE -hi Comment ctermbg=NONE ctermfg=59 guibg=NONE guifg=#515F6A cterm=NONE gui=NONE +if g:spacegray_italicize_comments + hi Comment ctermbg=NONE ctermfg=59 guibg=NONE guifg=#515F6A cterm=italic gui=italic +else + hi Comment ctermbg=NONE ctermfg=59 guibg=NONE guifg=#515F6A cterm=NONE gui=NONE +endif hi NonText ctermbg=NONE ctermfg=8 guibg=NONE guifg=#3E4853 cterm=NONE gui=NONE hi Title ctermbg=NONE ctermfg=231 guibg=NONE guifg=#FFFFFF cterm=NONE gui=NONE @@ -78,7 +90,11 @@ hi Folded ctermbg=NONE ctermfg=242 guibg=#1C1C1C guifg=#6C6C6C cte hi VertSplit ctermbg=238 ctermfg=238 guibg=#444444 guifg=#444444 cterm=NONE gui=NONE hi IncSearch ctermbg=9 ctermfg=0 guibg=#AF5F5F guifg=#141617 cterm=NONE gui=NONE -hi Search ctermbg=2 ctermfg=232 guibg=#919652 guifg=#141617 cterm=NONE gui=NONE +if g:spacegray_underline_search + hi Search ctermbg=NONE ctermfg=NONE guibg=NONE guifg=NONE cterm=underline gui=underline +else + hi Search ctermbg=2 ctermfg=232 guibg=#919652 guifg=#141617 cterm=NONE gui=NONE +endif hi TabLine ctermbg=232 ctermfg=249 guibg=#141617 guifg=#B3B8C4 cterm=NONE gui=NONE hi TabLineFill ctermbg=235 ctermfg=239 guibg=#303537 guifg=#303537 cterm=NONE gui=NONE