Skip to content

Commit

Permalink
Better transparent terminal support
Browse files Browse the repository at this point in the history
Sets the background color in cterm and gui to 0 and #000000 when
g:zenburn_transparent is 1.

Signed-off-by: Jani Nurminen <slinky@iki.fi>
  • Loading branch information
alanhamlett authored and jnurmine committed Sep 15, 2012
1 parent 5060f4d commit a4d366b
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions colors/zenburn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@
" list of configurable parameters.
"
" * You can now set a darker background for bright environments. To activate, use:
" contrast Zenburn, use:
"
" let g:zenburn_high_Contrast = 1
"
" * For transparent terminals set the background to black with:
" let g:zenburn_transparent = 1
"
" * For example, Vim help files uses the Ignore-group for the pipes in tags
" like "|somelink.txt|". By default, the pipes are not visible, as they
" map to Ignore group. If you wish to enable coloring of the Ignore group,
Expand Down Expand Up @@ -152,6 +153,10 @@ if ! exists("g:zenburn_high_Contrast")
let g:zenburn_high_Contrast = 0
endif

if ! exists("g:zenburn_transparent")
let g:zenburn_transparent = 0
endif

if ! exists("g:zenburn_color_also_Ignore")
let g:zenburn_color_also_Ignore = 0
endif
Expand Down Expand Up @@ -452,6 +457,18 @@ else
hi ColorColumn guibg=#484848
endif

if exists("g:zenburn_transparent") && g:zenburn_transparent
hi Normal ctermbg=0 guibg=#000000
hi Statement ctermbg=NONE
hi Title ctermbg=NONE
hi Todo ctermbg=NONE
hi Underlined ctermbg=NONE
hi DiffAdd ctermbg=NONE
hi DiffText ctermbg=NONE
hi ErrorMsg ctermbg=NONE
hi LineNr ctermbg=NONE
endif

if exists("g:zenburn_old_Visual") && g:zenburn_old_Visual
if exists("g:zenburn_alternate_Visual") && g:zenburn_alternate_Visual
" Visual with more contrast, thanks to Steve Hall & Cream posse
Expand All @@ -474,7 +491,11 @@ else
hi Visual guibg=#0f0f0f
hi VisualNos guibg=#0f0f0f
if &t_Co > 255
hi Visual ctermbg=0
if exists("g:zenburn_transparent") && g:zenburn_transparent
hi Visual ctermbg=235
else
hi Visual ctermbg=0
endif
endif
else
" low contrast
Expand Down

0 comments on commit a4d366b

Please sign in to comment.