Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g:onehalf_italic variable #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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