From ba72217e94267551c033aa51bf8cd2e3d6ac68f3 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Sat, 20 Feb 2021 15:59:55 -0800 Subject: [PATCH 1/2] g:onehalf_italic variable --- vim/colors/onehalfdark.vim | 6 +++++- vim/colors/onehalflight.vim | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vim/colors/onehalfdark.vim b/vim/colors/onehalfdark.vim index abbd67f..4ef7d6f 100644 --- a/vim/colors/onehalfdark.vim +++ b/vim/colors/onehalfdark.vim @@ -123,7 +123,11 @@ call s:h("WildMenu", s:fg, "", "") " See :help hl-Whitespace and :help hl-SpecialKey call s:h("Whitespace", s:non_text, "", "") call s:h("NonText", s:non_text, "", "") -call s:h("Comment", s:comment_fg, "", "italic") +if exists("g:onehalf_italic") && g:onehalf_italic + call s:h("Comment", s:comment_fg, "", "italic") +else + call s:h("Comment", s:comment_fg, "", "") +endif call s:h("Constant", s:cyan, "", "") call s:h("String", s:green, "", "") call s:h("Character", s:green, "", "") diff --git a/vim/colors/onehalflight.vim b/vim/colors/onehalflight.vim index 288fcd0..b04c9ab 100644 --- a/vim/colors/onehalflight.vim +++ b/vim/colors/onehalflight.vim @@ -123,7 +123,11 @@ call s:h("WildMenu", s:fg, "", "") " See :help hl-Whitespace and :help hl-SpecialKey call s:h("Whitespace", s:non_text, "", "") call s:h("NonText", s:non_text, "", "") -call s:h("Comment", s:comment_fg, "", "italic") +if exists("g:onehalf_italic") && g:onehalf_italic + call s:h("Comment", s:comment_fg, "", "italic") +else + call s:h("Comment", s:comment_fg, "", "") +endif call s:h("Constant", s:cyan, "", "") call s:h("String", s:green, "", "") call s:h("Character", s:green, "", "") From 3019ae4e397fb3a71ba22cee16bba26688d6b2a8 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Sat, 20 Feb 2021 16:02:46 -0800 Subject: [PATCH 2/2] Document g:onehalf_italic --- vim/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vim/README.md b/vim/README.md index 909896e..42f30b1 100644 --- a/vim/README.md +++ b/vim/README.md @@ -21,8 +21,9 @@ Download the files in [vim/](./) and put them in their respective folders ## Usage Put `colorscheme ` and `let g:airline_theme=''`, if using airline or `let g:lightline = { 'colorscheme': '' }`, if using lightline, in your `.vimrc` -to set the color scheme and airline (or lightline) theme. Make sure you have -syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended. +to set the color scheme and airline (or lightline) theme. `let g:onehalf_italic = 1` +before `colorscheme` to enable italics (requires terminal and font support). Make sure +you have syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended. For example: @@ -30,6 +31,7 @@ For example: syntax on set t_Co=256 set cursorline +let g:onehalf_italic = 1 colorscheme onehalflight let g:airline_theme='onehalfdark' " lightline