Skip to content

Commit b35e6ef

Browse files
committed
Merge branch 'mr-upstream-108' into develop (sonph#108)
* mr-upstream-108: Document g:onehalf_italic g:onehalf_italic variable
2 parents b25a6b5 + 3019ae4 commit b35e6ef

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

vim/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ Download the files in [vim/](./) and put them in their respective folders
2121
## Usage
2222
Put `colorscheme <scheme>` and `let g:airline_theme='<theme>'`, if using airline
2323
or `let g:lightline = { 'colorscheme': '<theme>' }`, if using lightline, in your `.vimrc`
24-
to set the color scheme and airline (or lightline) theme. Make sure you have
25-
syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended.
24+
to set the color scheme and airline (or lightline) theme. `let g:onehalf_italic = 1`
25+
before `colorscheme` to enable italics (requires terminal and font support). Make sure
26+
you have syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended.
2627

2728
For example:
2829

2930
```
3031
syntax on
3132
set t_Co=256
3233
set cursorline
34+
let g:onehalf_italic = 1
3335
colorscheme onehalflight
3436
let g:airline_theme='onehalfdark'
3537
" lightline

vim/colors/onehalfdark.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ call s:h("WildMenu", s:fg, "", "")
123123
" See :help hl-Whitespace and :help hl-SpecialKey
124124
call s:h("Whitespace", s:non_text, "", "")
125125
call s:h("NonText", s:non_text, "", "")
126-
call s:h("Comment", s:comment_fg, "", "italic")
126+
if exists("g:onehalf_italic") && g:onehalf_italic
127+
call s:h("Comment", s:comment_fg, "", "italic")
128+
else
129+
call s:h("Comment", s:comment_fg, "", "")
130+
endif
127131
call s:h("Constant", s:cyan, "", "")
128132
call s:h("String", s:green, "", "")
129133
call s:h("Character", s:green, "", "")

vim/colors/onehalflight.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ call s:h("WildMenu", s:fg, "", "")
123123
" See :help hl-Whitespace and :help hl-SpecialKey
124124
call s:h("Whitespace", s:non_text, "", "")
125125
call s:h("NonText", s:non_text, "", "")
126-
call s:h("Comment", s:comment_fg, "", "italic")
126+
if exists("g:onehalf_italic") && g:onehalf_italic
127+
call s:h("Comment", s:comment_fg, "", "italic")
128+
else
129+
call s:h("Comment", s:comment_fg, "", "")
130+
endif
127131
call s:h("Constant", s:cyan, "", "")
128132
call s:h("String", s:green, "", "")
129133
call s:h("Character", s:green, "", "")

0 commit comments

Comments
 (0)