Skip to content

Commit ef8fa31

Browse files
committed
Merge pull request tomasr#41 from guiniol/master
Add option for a transparent background
2 parents a36e027 + 14c950f commit ef8fa31

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ If you prefer the scheme to match the original monokai background color, put thi
1919
let g:molokai_original = 1
2020
```
2121

22+
If you prefer a transparent background for the terminal version, put this in your .vimrc file:
23+
```
24+
let g:molokai_transparent = 1
25+
```
26+
2227
There is also an alternative scheme under development for color terminals which attempts to bring the 256 color version as close as possible to the the default (dark) GUI version. To access, add this to your .vimrc:
2328
```
2429
let g:rehash256 = 1

colors/molokai.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ else
3232
let s:molokai_italic = 1
3333
endif
3434

35+
if exists("g:molokai_transparent")
36+
let s:molokai_transparent = g:molokai_transparent
37+
else
38+
let s:molokai_transparent = 0
39+
endif
40+
3541
hi Boolean guifg=#AE81FF
3642
hi Character guifg=#E6DB74
3743
hi Number guifg=#AE81FF
@@ -165,6 +171,10 @@ if &t_Co > 255
165171
hi Normal ctermbg=234
166172
hi CursorLine ctermbg=235 cterm=none
167173
hi CursorLineNr ctermfg=208 cterm=none
174+
elseif s:molokai_transparent == 1
175+
hi Normal ctermfg=252 ctermbg=none
176+
hi CursorLine ctermbg=234 cterm=none
177+
hi CursorLineNr ctermfg=208 cterm=none
168178
else
169179
hi Normal ctermfg=252 ctermbg=233
170180
hi CursorLine ctermbg=234 cterm=none

0 commit comments

Comments
 (0)