首页 > 代码库 > vim的molokai配色,很像sublime text 的monokai主题
vim的molokai配色,很像sublime text 的monokai主题
sublime text的配色主题比较绚丽多彩,今天浏览网页时发现一款vim的molokai配色,它是基于textmate的monokai主题,
和sublime text 的默认主题monokai很像,喜欢使用sublime text的童鞋可以试试。
效果截图:
molokai.vim代码如下:
" Vim color file"" Author: Tomas Restrepo <tomas@winterdom.com>"" Note: Based on the monokai theme for textmate" by Wimer Hazenberg and its darker variant " by Hamish Stuart Macpherson"hi clearset background=darkset t_Co=256 "告知molokai,终端支持256色。if version > 580 " no guarantees for version 5.8 and below, but this makes it stop " complaining hi clear if exists("syntax_on") syntax reset endifendiflet g:colors_name="molokai"if exists("g:molokai_original") let s:molokai_original = g:molokai_originalelse let s:molokai_original = 0endifhi Boolean guifg=#AE81FFhi Character guifg=#E6DB74hi Number guifg=#AE81FFhi String guifg=#E6DB74hi Conditional guifg=#F92672 gui=boldhi Constant guifg=#AE81FF gui=boldhi Cursor guifg=#000000 guibg=#F8F8F0hi Debug guifg=#BCA3A3 gui=boldhi Define guifg=#66D9EFhi Delimiter guifg=#8F8F8Fhi DiffAdd guibg=#13354Ahi DiffChange guifg=#89807D guibg=#4C4745hi DiffDelete guifg=#960050 guibg=#1E0010hi DiffText guibg=#4C4745 gui=italic,boldhi Directory guifg=#A6E22E gui=boldhi Error guifg=#960050 guibg=#1E0010hi ErrorMsg guifg=#F92672 guibg=#232526 gui=boldhi Exception guifg=#A6E22E gui=boldhi Float guifg=#AE81FFhi FoldColumn guifg=#465457 guibg=#000000hi Folded guifg=#465457 guibg=#000000hi Function guifg=#A6E22Ehi Identifier guifg=#FD971Fhi Ignore guifg=#808080 guibg=bghi IncSearch guifg=#C4BE89 guibg=#000000hi Keyword guifg=#F92672 gui=boldhi Label guifg=#E6DB74 gui=nonehi Macro guifg=#C4BE89 gui=italichi SpecialKey guifg=#66D9EF gui=italichi MatchParen guifg=#000000 guibg=#FD971F gui=boldhi ModeMsg guifg=#E6DB74hi MoreMsg guifg=#E6DB74hi Operator guifg=#F92672" complete menuhi Pmenu guifg=#66D9EF guibg=#000000hi PmenuSel guibg=#808080hi PmenuSbar guibg=#080808hi PmenuThumb guifg=#66D9EFhi PreCondit guifg=#A6E22E gui=boldhi PreProc guifg=#A6E22Ehi Question guifg=#66D9EFhi Repeat guifg=#F92672 gui=boldhi Search guifg=#FFFFFF guibg=#455354" marks columnhi SignColumn guifg=#A6E22E guibg=#232526hi SpecialChar guifg=#F92672 gui=boldhi SpecialComment guifg=#465457 gui=boldhi Special guifg=#66D9EF guibg=bg gui=italichi SpecialKey guifg=#888A85 gui=italicif has("spell") hi SpellBad guisp=#FF0000 gui=undercurl hi SpellCap guisp=#7070F0 gui=undercurl hi SpellLocal guisp=#70F0F0 gui=undercurl hi SpellRare guisp=#FFFFFF gui=undercurlendifhi Statement guifg=#F92672 gui=boldhi StatusLine guifg=#455354 guibg=fghi StatusLineNC guifg=#808080 guibg=#080808hi StorageClass guifg=#FD971F gui=italichi Structure guifg=#66D9EFhi Tag guifg=#F92672 gui=italichi Title guifg=#ef5939hi Todo guifg=#FFFFFF guibg=bg gui=boldhi Typedef guifg=#66D9EFhi Type guifg=#66D9EF gui=nonehi Underlined guifg=#808080 gui=underlinehi VertSplit guifg=#808080 guibg=#080808 gui=boldhi VisualNOS guibg=#403D3Dhi Visual guibg=#403D3Dhi WarningMsg guifg=#FFFFFF guibg=#333333 gui=boldhi WildMenu guifg=#66D9EF guibg=#000000if s:molokai_original == 1 hi Normal guifg=#F8F8F2 guibg=#272822 hi Comment guifg=#75715E hi CursorLine guibg=#3E3D32 hi CursorColumn guibg=#3E3D32 hi LineNr guifg=#BCBCBC guibg=#3B3A32 hi NonText guifg=#BCBCBC guibg=#3B3A32else hi Normal guifg=#F8F8F2 guibg=#1B1D1E hi Comment guifg=#465457 hi CursorLine guibg=#293739 hi CursorColumn guibg=#293739 hi LineNr guifg=#BCBCBC guibg=#232526 hi NonText guifg=#BCBCBC guibg=#232526end"" Support for 256-color terminal"if &t_Co > 255 hi Boolean ctermfg=135 hi Character ctermfg=144 hi Number ctermfg=135 hi String ctermfg=144 hi Conditional ctermfg=161 cterm=bold hi Constant ctermfg=135 cterm=bold hi Cursor ctermfg=16 ctermbg=253 hi Debug ctermfg=225 cterm=bold hi Define ctermfg=81 hi Delimiter ctermfg=241 hi DiffAdd ctermbg=24 hi DiffChange ctermfg=181 ctermbg=239 hi DiffDelete ctermfg=162 ctermbg=53 hi DiffText ctermbg=102 cterm=bold hi Directory ctermfg=118 cterm=bold hi Error ctermfg=219 ctermbg=89 hi ErrorMsg ctermfg=199 ctermbg=16 cterm=bold hi Exception ctermfg=118 cterm=bold hi Float ctermfg=135 hi FoldColumn ctermfg=67 ctermbg=16 hi Folded ctermfg=67 ctermbg=16 hi Function ctermfg=118 hi Identifier ctermfg=208 hi Ignore ctermfg=244 ctermbg=232 hi IncSearch ctermfg=193 ctermbg=16 hi Keyword ctermfg=161 cterm=bold hi Label ctermfg=229 cterm=none hi Macro ctermfg=193 hi SpecialKey ctermfg=81 hi MatchParen ctermfg=16 ctermbg=208 cterm=bold hi ModeMsg ctermfg=229 hi MoreMsg ctermfg=229 hi Operator ctermfg=161 " complete menu hi Pmenu ctermfg=81 ctermbg=16 hi PmenuSel ctermbg=244 hi PmenuSbar ctermbg=232 hi PmenuThumb ctermfg=81 hi PreCondit ctermfg=118 cterm=bold hi PreProc ctermfg=118 hi Question ctermfg=81 hi Repeat ctermfg=161 cterm=bold hi Search ctermfg=253 ctermbg=66 " marks column hi SignColumn ctermfg=118 ctermbg=235 hi SpecialChar ctermfg=161 cterm=bold hi SpecialComment ctermfg=245 cterm=bold hi Special ctermfg=81 ctermbg=232 hi SpecialKey ctermfg=245 hi Statement ctermfg=161 cterm=bold hi StatusLine ctermfg=238 ctermbg=253 hi StatusLineNC ctermfg=244 ctermbg=232 hi StorageClass ctermfg=208 hi Structure ctermfg=81 hi Tag ctermfg=161 hi Title ctermfg=166 hi Todo ctermfg=231 ctermbg=232 cterm=bold hi Typedef ctermfg=81 hi Type ctermfg=81 cterm=none hi Underlined ctermfg=244 cterm=underline hi VertSplit ctermfg=244 ctermbg=232 cterm=bold hi VisualNOS ctermbg=238 hi Visual ctermbg=235 hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold hi WildMenu ctermfg=81 ctermbg=16 hi Normal ctermfg=252 ctermbg=233 hi Comment ctermfg=59 hi CursorLine ctermbg=234 cterm=none hi CursorColumn ctermbg=234 hi LineNr ctermfg=250 ctermbg=234 hi NonText ctermfg=250 ctermbg=234end
使用方法:
将molokai.vim文件放到~/.vim/colors/文件夹下即可。
在~/.vimrc 中配置 :colorscheme molokai 则默认使用此配色。
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。