Skip to content

Commit

Permalink
Merge branch 'mr-upstream-108' into develop (sonph#108)
Browse files Browse the repository at this point in the history
* mr-upstream-108:
  Document g:onehalf_italic
  g:onehalf_italic variable
  • Loading branch information
dwettstein committed Nov 13, 2023
2 parents b25a6b5 + 3019ae4 commit b35e6ef
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions vim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ Download the files in [vim/](./) and put them in their respective folders
## Usage
Put `colorscheme <scheme>` and `let g:airline_theme='<theme>'`, if using airline
or `let g:lightline = { 'colorscheme': '<theme>' }`, 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:

```
syntax on
set t_Co=256
set cursorline
let g:onehalf_italic = 1
colorscheme onehalflight
let g:airline_theme='onehalfdark'
" lightline
Expand Down
6 changes: 5 additions & 1 deletion vim/colors/onehalfdark.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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, "", "")
Expand Down
6 changes: 5 additions & 1 deletion vim/colors/onehalflight.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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, "", "")
Expand Down

0 comments on commit b35e6ef

Please sign in to comment.