set background=dark if exists("syntax_on") syntax reset endif let g:colors_name="twilight" if has("gui_running") || &t_Co == 256 "" colors {{{ let s:empty = [] let s:none = [ "none" ] let s:light_grey_blue = [ "102", "#878787" ] let s:grey_blue = [ "103", "#8787af" ] let s:mid_grey_blue = [ "59", "#5f5f5f" ] let s:blue = [ "39", "#00afff" ] let s:beige = [ "179", "#dfaf5f" ] let s:orange = [ "202", "#ff5f00" ] let s:light_orange = [ "214", "#ffaf00" ] let s:peach = [ "173", "#df875f" ] let s:yellow = [ "227", "#ffff5f" ] let s:bright_yellow = [ "11", "#ffff00" ] let s:purple = [ "57", "#5f00ff" ] let s:violet = [ "139", "#af87af" ] let s:green = [ "107", "#87af5f" ] let s:dark_green = [ "34", "#00af00" ] let s:dark_green_blue = [ "35", "#00af5f" ] let s:light_green = [ "150", "#afdf87" ] let s:dark_red = [ "88", "#870000" ] let s:red = [ "124", "#af0000" ] let s:bright_red = [ "1", "#808080" ] let s:light_red = [ "167", "#df5f5f" ] let s:brown = [ "130", "#af5f00" ] let s:tan = [ "137", "#af875f" ] let s:cyan = [ "116", "#87dfdf" ] let s:dark_grey = [ "234", "#1c1c1c" ] let s:grey = [ "236", "#303030" ] let s:mid_grey = [ "238", "#444444" ] let s:light_grey = [ "250", "#bcbcbc" ] let s:white = [ "230", "#ffffdf" ] let s:black = [ "16", "#000000" ] " }}} "" functions "{{{ function HiGroup(group, fg, bg, attr) exec "hi clear ".a:group if 1 < len(a:fg) exec "hi ".a:group." ctermfg=".get(a:fg, 0) if 2 == len(a:fg) exec "hi ".a:group." guifg=".get(a:fg, 1) endif endif if 1 < len(a:bg) exec "hi ".a:group." ctermbg=".get(a:bg, 0) if 2 == len(a:bg) exec "hi ".a:group." guibg=".get(a:bg, 1) endif endif if a:attr != "" exec "hi ".a:group." cterm=".a:attr." gui="a:attr endif endfunction " }}} "" highlight groups {{{ "call HiGroup("ColorColumn", s:empty, s:empty, "none") "call HiGroup("Conceal", s:empty, s:empty, "none") "call HiGroup("Cursor", s:empty, s:empty, "none") "call HiGroup("CursorIM", s:empty, s:empty, "none") "call HiGroup("CursorColumn", s:empty, s:empty, "none") "call HiGroup("CursorLine", s:none, s:dark_grey, "none") call HiGroup("Directory", s:light_green, s:empty, "none") call HiGroup("DiffAdd", s:dark_green, s:grey, "bold") call HiGroup("DiffChange", s:white, s:grey, "bold") call HiGroup("DiffDelete", s:red, s:grey, "bold") call HiGroup("DiffText", s:empty, s:dark_red, "none") call HiGroup("ErrorMsg", s:white, s:red, "none") call HiGroup("VertSplit", s:dark_grey, s:dark_grey, "none") call HiGroup("Folded", s:dark_green_blue, s:dark_grey, "none") call HiGroup("FoldColumn", s:dark_green_blue, s:dark_grey, "none") call HiGroup("SignColumn", s:empty, s:dark_grey, "none") "call HiGroup("IncSearch", s:empty, s:empty, "none") call HiGroup("LineNr", s:white, s:dark_grey, "none") call HiGroup("CursorLineNr", s:light_orange, s:dark_grey, "none") call HiGroup("MatchParen", s:none, s:blue, "none") "call HiGroup("ModeMsg", s:empty, s:empty, "none") "call HiGroup("MoreMsg", s:empty, s:empty, "none") call HiGroup("NonText", s:blue, s:empty, "none") call HiGroup("Normal", s:white, s:black, "none") call HiGroup("Pmenu", s:light_grey, s:grey, "none") call HiGroup("PmenuSel", s:black, s:light_orange, "bold") "call HiGroup("PmenuSbar", s:empty, s:empty, "none") "call HiGroup("PmenuThumb", s:empty, s:empty, "none") "call HiGroup("Question", s:empty, s:empty, "none") call HiGroup("Search", s:none, s:dark_grey, "none") "call HiGroup("SpecialKey", s:emptnoney, s:empty, "none") call HiGroup("SpellBad", s:bright_red, s:empty, "bold") call HiGroup("SpellCap", s:blue, s:empty, "bold") call HiGroup("SpellLocal", s:light_orange, s:empty, "bold") call HiGroup("SpellRare", s:beige, s:empty, "bold") "call HiGroup("StatusLine", s:empty, s:empty, "none") "call HiGroup("StatusLineNC", s:empty, s:empty, "none") call HiGroup("TabLine", s:light_grey, s:mid_grey, "bold") call HiGroup("TabLineFill", s:none, s:mid_grey, "none") call HiGroup("TabLineSel", s:white, s:dark_grey, "bold") call HiGroup("Title", s:violet, s:empty, "bold") call HiGroup("Visual", s:empty, s:grey, "none") "call HiGroup("VisualNOS", s:empty, s:empty, "none") "call HiGroup("WarningMsg", s:empty, s:empty, "none") "call HiGroup("WildMenu", s:empty, s:empty, "none") "call HiGroup("Menu", s:empty, s:empty, "none") "call HiGroup("Scrollbar", s:empty, s:empty, "none") "call HiGroup("Tooltip", s:empty, s:empty, "none") " }}} "" syntax groups {{{ call HiGroup("Comment", s:mid_grey_blue, s:empty, "none") call HiGroup("Constant", s:light_red, s:empty, "none") call HiGroup("String", s:green, s:empty, "none") "call HiGroup("Character", s:empty, s:empty, "none") "call HiGroup("Number", s:empty, s:empty, "none") "call HiGroup("Boolean", s:empty, s:empty, "none") "call HiGroup("Float", s:empty, s:empty, "none") call HiGroup("Identifier", s:grey_blue, s:empty, "none") call HiGroup("Function", s:brown, s:empty, "none") call HiGroup("Statement", s:beige, s:empty, "none") "call HiGroup("Conditional", s:empty, s:empty, "none") "call HiGroup("Repeat", s:empty, s:empty, "none") "call HiGroup("Label", s:empty, s:empty, "none") call HiGroup("Operator", s:tan, s:empty, "none") "call HiGroup("Keyword", s:empty, s:empty, "none") "call HiGroup("Exception", s:empty, s:empty, "none") call HiGroup("PreProc", s:light_grey_blue, s:empty, "none") "call HiGroup("Include", s:empty, s:empty, "none") "call HiGroup("Define", s:empty, s:empty, "none") call HiGroup("Macro", s:peach, s:empty, "none") "call HiGroup("PreCondit", s:empty, s:empty, "none") call HiGroup("Type", s:yellow, s:empty, "none") call HiGroup("StorageClass", s:beige, s:empty, "none") call HiGroup("Structure", s:beige, s:empty, "none") "call HiGroup("Typedef", s:empty, s:empty, "none") call HiGroup("Special", s:light_green, s:empty, "none") "call HiGroup("SpecialChar", s:empty, s:empty, "none") "call HiGroup("Tag", s:empty, s:empty, "none") "call HiGroup("Delimiter", s:empty, s:empty, "none") "call HiGroup("SpecialComment", s:empty, s:empty, "none") "call HiGroup("Debug", s:empty, s:empty, "none") call HiGroup("Underlined", s:blue, s:empty, "underline") "call HiGroup("Ignore", s:empty, s:empty, "none") call HiGroup("Error", s:white, s:red, "bold") call HiGroup("Todo", s:orange, s:empty, "bold") " }}} "" custom syntax groups {{{ call HiGroup("Note", s:dark_green, s:empty, "bold") call HiGroup("Important", s:bright_yellow, s:empty, "bold") call HiGroup("Research", s:orange, s:empty, "bold") call HiGroup("SyntasticErrorSign", s:white, s:red, "bold") call HiGroup("SyntasticWarningSign", s:white, s:purple, "bold") "call HiGroup("SyntasticErrorLine", s:empty, s:blue, "none") "call HiGroup("SyntasticWarningLine", s:empty, s:empty, "none") call HiGroup("SyntasticError", s:white, s:red, "bold") call HiGroup("SyntasticWarning", s:none, s:purple, "bold") "" }}} "" delete functions {{{ delfunction HiGroup " }}} endif