diff --git a/README.md b/README.md index f49533d..3d84542 100644 --- a/README.md +++ b/README.md @@ -140,3 +140,12 @@ set guifont=Powerline_Consolas:h11 set renderoptions=type:directx,gamma:1.5,contrast:0.5,geom:1,renmode:5,taamode:1,level:0.5 ``` +### Are italics supported? +Italics in comments can be enabled by setting `g:codedark_italics = 1` _before_ +setting the colorscheme in your `.vimrc` like so: +``` +let g:codedark_italics = 1 +colorscheme codedark +``` +Please note that your terminal must support rendering italic fonts. + diff --git a/colors/codedark.vim b/colors/codedark.vim index 4f0b072..aad67b0 100644 --- a/colors/codedark.vim +++ b/colors/codedark.vim @@ -107,6 +107,11 @@ if !exists("g:codedark_conservative") let g:codedark_conservative=0 endif +" Italicized comments +if !exists("g:codedark_italics") + let g:codedark_italics=0 +endif + let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'} let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'} let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'} @@ -174,7 +179,7 @@ hi! link diffAdded DiffAdd hi! link diffChanged DiffChange hi! link diffRemoved DiffDelete -call hi('Comment', s:cdGreen, {}, 'none', {}) +if g:codedark_italics | call hi('Comment', s:cdGreen, {}, 'italic', {}) | else | call hi('Comment', s:cdGreen, {}, 'none', {}) | endif call hi('Constant', s:cdBlue, {}, 'none', {}) call hi('String', s:cdOrange, {}, 'none', {}) @@ -209,7 +214,7 @@ call hi('Special', s:cdYellowOrange, {}, 'none', {}) call hi('SpecialChar', s:cdFront, {}, 'none', {}) call hi('Tag', s:cdFront, {}, 'none', {}) call hi('Delimiter', s:cdFront, {}, 'none', {}) -call hi('SpecialComment', s:cdGreen, {}, 'none', {}) +if g:codedark_italics | call hi('SpecialComment', s:cdGreen, {}, 'italic', {}) | else | call hi('SpecialComment', s:cdGreen, {}, 'none', {}) | endif call hi('Debug', s:cdFront, {}, 'none', {}) call hi('Underlined', s:cdNone, {}, 'underline', {})