mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-21 11:42:28 +00:00
Solarized colorscheme
This commit is contained in:
parent
7a93605688
commit
6cde71312b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.*
|
95
Xresources
Normal file
95
Xresources
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
!-------------------------------------------------------------------------------
|
||||||
|
! Xft settings
|
||||||
|
!-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Xft.dpi: 96
|
||||||
|
Xft.antialias: false
|
||||||
|
Xft.rgba: rgb
|
||||||
|
Xft.hinting: true
|
||||||
|
Xft.hintstyle: hintslight
|
||||||
|
|
||||||
|
!-------------------------------------------------------------------------------
|
||||||
|
! URxvt settings
|
||||||
|
! Colours lifted from Solarized (http://ethanschoonover.com/solarized)
|
||||||
|
! More info at:
|
||||||
|
! http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod
|
||||||
|
!-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
URxvt.depth: 32
|
||||||
|
URxvt.geometry: 90x30
|
||||||
|
URxvt.transparent: false
|
||||||
|
URxvt.fading: 0
|
||||||
|
! URxvt.urgentOnBell: true
|
||||||
|
! URxvt.visualBell: true
|
||||||
|
URxvt.loginShell: true
|
||||||
|
URxvt.saveLines: 50
|
||||||
|
URxvt.internalBorder: 3
|
||||||
|
URxvt.lineSpace: 0
|
||||||
|
|
||||||
|
! Fonts
|
||||||
|
URxvt.allow_bold: true
|
||||||
|
/* URxvt.font: -*-terminus-medium-r-normal-*-12-120-72-72-c-60-iso8859-1 */
|
||||||
|
URxvt*font: xft:DejaVu Sans Mono:pixelsize=14
|
||||||
|
URxvt*boldFont: xft:DejaVu Sans Mono:pixelsize=14:style=bold
|
||||||
|
|
||||||
|
! Fix font space
|
||||||
|
URxvt*letterSpace: -2
|
||||||
|
|
||||||
|
! Scrollbar
|
||||||
|
URxvt.scrollStyle: rxvt
|
||||||
|
URxvt.scrollBar: false
|
||||||
|
|
||||||
|
! Perl extensions
|
||||||
|
URxvt.perl-ext-common: default,matcher
|
||||||
|
URxvt.matcher.button: 1
|
||||||
|
URxvt.urlLauncher: google-chrome
|
||||||
|
|
||||||
|
! Cursor
|
||||||
|
URxvt.cursorBlink: true
|
||||||
|
URxvt.cursorColor: #657b83
|
||||||
|
URxvt.cursorUnderline: false
|
||||||
|
|
||||||
|
! Pointer
|
||||||
|
URxvt.pointerBlank: true
|
||||||
|
|
||||||
|
!!Source http://github.com/altercation/solarized
|
||||||
|
|
||||||
|
*background: #002b36
|
||||||
|
*foreground: #657b83
|
||||||
|
!!*fading: 40
|
||||||
|
*fadeColor: #002b36
|
||||||
|
*cursorColor: #93a1a1
|
||||||
|
*pointerColorBackground: #586e75
|
||||||
|
*pointerColorForeground: #93a1a1
|
||||||
|
|
||||||
|
!! black dark/light
|
||||||
|
*color0: #073642
|
||||||
|
*color8: #002b36
|
||||||
|
|
||||||
|
!! red dark/light
|
||||||
|
*color1: #dc322f
|
||||||
|
*color9: #cb4b16
|
||||||
|
|
||||||
|
!! green dark/light
|
||||||
|
*color2: #859900
|
||||||
|
*color10: #586e75
|
||||||
|
|
||||||
|
!! yellow dark/light
|
||||||
|
*color3: #b58900
|
||||||
|
*color11: #657b83
|
||||||
|
|
||||||
|
!! blue dark/light
|
||||||
|
*color4: #268bd2
|
||||||
|
*color12: #839496
|
||||||
|
|
||||||
|
!! magenta dark/light
|
||||||
|
*color5: #d33682
|
||||||
|
*color13: #6c71c4
|
||||||
|
|
||||||
|
!! cyan dark/light
|
||||||
|
*color6: #2aa198
|
||||||
|
*color14: #93a1a1
|
||||||
|
|
||||||
|
!! white dark/light
|
||||||
|
*color7: #eee8d5
|
||||||
|
*color15: #fdf6e3
|
377
vim/colors/Tomorrow-Night-Blue.vim
Normal file
377
vim/colors/Tomorrow-Night-Blue.vim
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
" Tomorrow Night Blue - Full Colour and 256 Colour
|
||||||
|
" http://chriskempson.com
|
||||||
|
"
|
||||||
|
" Hex colour conversion functions borrowed from the theme "Desert256""
|
||||||
|
|
||||||
|
" Default GUI Colours
|
||||||
|
let s:foreground = "ffffff"
|
||||||
|
let s:background = "002451"
|
||||||
|
let s:selection = "003f8e"
|
||||||
|
let s:line = "00346e"
|
||||||
|
let s:comment = "7285b7"
|
||||||
|
let s:red = "ff9da4"
|
||||||
|
let s:orange = "ffc58f"
|
||||||
|
let s:yellow = "ffeead"
|
||||||
|
let s:green = "d1f1a9"
|
||||||
|
let s:aqua = "99ffff"
|
||||||
|
let s:blue = "bbdaff"
|
||||||
|
let s:purple = "ebbbff"
|
||||||
|
let s:window = "4d5057"
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
hi clear
|
||||||
|
syntax reset
|
||||||
|
|
||||||
|
let g:colors_name = "Tomorrow-Night-Blue"
|
||||||
|
|
||||||
|
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||||
|
" Returns an approximate grey index for the given grey level
|
||||||
|
fun <SID>grey_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 23
|
||||||
|
return 0
|
||||||
|
elseif a:x < 69
|
||||||
|
return 1
|
||||||
|
elseif a:x < 103
|
||||||
|
return 2
|
||||||
|
elseif a:x < 127
|
||||||
|
return 3
|
||||||
|
elseif a:x < 150
|
||||||
|
return 4
|
||||||
|
elseif a:x < 173
|
||||||
|
return 5
|
||||||
|
elseif a:x < 196
|
||||||
|
return 6
|
||||||
|
elseif a:x < 219
|
||||||
|
return 7
|
||||||
|
elseif a:x < 243
|
||||||
|
return 8
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 14
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 8) / 10
|
||||||
|
let l:m = (a:x - 8) % 10
|
||||||
|
if l:m < 5
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual grey level represented by the grey index
|
||||||
|
fun <SID>grey_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 46
|
||||||
|
elseif a:n == 2
|
||||||
|
return 92
|
||||||
|
elseif a:n == 3
|
||||||
|
return 115
|
||||||
|
elseif a:n == 4
|
||||||
|
return 139
|
||||||
|
elseif a:n == 5
|
||||||
|
return 162
|
||||||
|
elseif a:n == 6
|
||||||
|
return 185
|
||||||
|
elseif a:n == 7
|
||||||
|
return 208
|
||||||
|
elseif a:n == 8
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 8 + (a:n * 10)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given grey index
|
||||||
|
fun <SID>grey_colour(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 9
|
||||||
|
return 79
|
||||||
|
else
|
||||||
|
return 79 + a:n
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 25
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 231 + a:n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns an approximate colour index for the given colour level
|
||||||
|
fun <SID>rgb_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 69
|
||||||
|
return 0
|
||||||
|
elseif a:x < 172
|
||||||
|
return 1
|
||||||
|
elseif a:x < 230
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 3
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 75
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 55) / 40
|
||||||
|
let l:m = (a:x - 55) % 40
|
||||||
|
if l:m < 20
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual colour level for the given colour index
|
||||||
|
fun <SID>rgb_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 139
|
||||||
|
elseif a:n == 2
|
||||||
|
return 205
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 55 + (a:n * 40)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given R/G/B colour indices
|
||||||
|
fun <SID>rgb_colour(x, y, z)
|
||||||
|
if &t_Co == 88
|
||||||
|
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||||
|
else
|
||||||
|
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the given R/G/B colour levels
|
||||||
|
fun <SID>colour(r, g, b)
|
||||||
|
" Get the closest grey
|
||||||
|
let l:gx = <SID>grey_number(a:r)
|
||||||
|
let l:gy = <SID>grey_number(a:g)
|
||||||
|
let l:gz = <SID>grey_number(a:b)
|
||||||
|
|
||||||
|
" Get the closest colour
|
||||||
|
let l:x = <SID>rgb_number(a:r)
|
||||||
|
let l:y = <SID>rgb_number(a:g)
|
||||||
|
let l:z = <SID>rgb_number(a:b)
|
||||||
|
|
||||||
|
if l:gx == l:gy && l:gy == l:gz
|
||||||
|
" There are two possibilities
|
||||||
|
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||||
|
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||||
|
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||||
|
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||||
|
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||||
|
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||||
|
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||||
|
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||||
|
if l:dgrey < l:drgb
|
||||||
|
" Use the grey
|
||||||
|
return <SID>grey_colour(l:gx)
|
||||||
|
else
|
||||||
|
" Use the colour
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Only one possibility
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||||
|
fun <SID>rgb(rgb)
|
||||||
|
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||||
|
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||||
|
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||||
|
|
||||||
|
return <SID>colour(l:r, l:g, l:b)
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Sets the highlighting for the given group
|
||||||
|
fun <SID>X(group, fg, bg, attr)
|
||||||
|
if a:fg != ""
|
||||||
|
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||||
|
endif
|
||||||
|
if a:bg != ""
|
||||||
|
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||||
|
endif
|
||||||
|
if a:attr != ""
|
||||||
|
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("Normal", s:foreground, s:background, "")
|
||||||
|
call <SID>X("LineNr", s:selection, "", "")
|
||||||
|
call <SID>X("NonText", s:selection, "", "")
|
||||||
|
call <SID>X("SpecialKey", s:selection, "", "")
|
||||||
|
call <SID>X("Search", s:background, s:yellow, "")
|
||||||
|
call <SID>X("TabLine", s:foreground, s:background, "reverse")
|
||||||
|
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
||||||
|
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||||
|
call <SID>X("Visual", "", s:selection, "")
|
||||||
|
call <SID>X("Directory", s:blue, "", "")
|
||||||
|
call <SID>X("ModeMsg", s:green, "", "")
|
||||||
|
call <SID>X("MoreMsg", s:green, "", "")
|
||||||
|
call <SID>X("Question", s:green, "", "")
|
||||||
|
call <SID>X("WarningMsg", s:red, "", "")
|
||||||
|
call <SID>X("MatchParen", "", s:selection, "")
|
||||||
|
call <SID>X("Folded", s:comment, s:background, "")
|
||||||
|
call <SID>X("FoldColumn", "", s:background, "")
|
||||||
|
if version >= 700
|
||||||
|
call <SID>X("CursorLine", "", s:line, "none")
|
||||||
|
call <SID>X("CursorColumn", "", s:line, "none")
|
||||||
|
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||||
|
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||||
|
end
|
||||||
|
if version >= 703
|
||||||
|
call <SID>X("ColorColumn", "", s:line, "none")
|
||||||
|
end
|
||||||
|
|
||||||
|
" Standard Highlighting
|
||||||
|
call <SID>X("Comment", s:comment, "", "")
|
||||||
|
call <SID>X("Todo", s:comment, s:background, "")
|
||||||
|
call <SID>X("Title", s:comment, "", "")
|
||||||
|
call <SID>X("Identifier", s:red, "", "none")
|
||||||
|
call <SID>X("Statement", s:foreground, "", "")
|
||||||
|
call <SID>X("Conditional", s:foreground, "", "")
|
||||||
|
call <SID>X("Repeat", s:foreground, "", "")
|
||||||
|
call <SID>X("Structure", s:purple, "", "")
|
||||||
|
call <SID>X("Function", s:blue, "", "")
|
||||||
|
call <SID>X("Constant", s:orange, "", "")
|
||||||
|
call <SID>X("String", s:green, "", "")
|
||||||
|
call <SID>X("Special", s:foreground, "", "")
|
||||||
|
call <SID>X("PreProc", s:purple, "", "")
|
||||||
|
call <SID>X("Operator", s:aqua, "", "none")
|
||||||
|
call <SID>X("Type", s:blue, "", "none")
|
||||||
|
call <SID>X("Define", s:purple, "", "none")
|
||||||
|
call <SID>X("Include", s:blue, "", "")
|
||||||
|
"call <SID>X("Ignore", "666666", "", "")
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("vimCommand", s:red, "", "none")
|
||||||
|
|
||||||
|
" C Highlighting
|
||||||
|
call <SID>X("cType", s:yellow, "", "")
|
||||||
|
call <SID>X("cStorageClass", s:purple, "", "")
|
||||||
|
call <SID>X("cConditional", s:purple, "", "")
|
||||||
|
call <SID>X("cRepeat", s:purple, "", "")
|
||||||
|
|
||||||
|
" PHP Highlighting
|
||||||
|
call <SID>X("phpVarSelector", s:red, "", "")
|
||||||
|
call <SID>X("phpKeyword", s:purple, "", "")
|
||||||
|
call <SID>X("phpRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("phpConditional", s:purple, "", "")
|
||||||
|
call <SID>X("phpStatement", s:purple, "", "")
|
||||||
|
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||||
|
|
||||||
|
" Ruby Highlighting
|
||||||
|
call <SID>X("rubySymbol", s:green, "", "")
|
||||||
|
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAccess", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||||
|
call <SID>X("rubyInclude", s:blue, "", "")
|
||||||
|
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||||
|
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||||
|
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||||
|
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||||
|
call <SID>X("rubyConditional", s:purple, "", "")
|
||||||
|
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("rubyControl", s:purple, "", "")
|
||||||
|
call <SID>X("rubyException", s:purple, "", "")
|
||||||
|
|
||||||
|
" Python Highlighting
|
||||||
|
call <SID>X("pythonInclude", s:purple, "", "")
|
||||||
|
call <SID>X("pythonStatement", s:purple, "", "")
|
||||||
|
call <SID>X("pythonConditional", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("pythonException", s:purple, "", "")
|
||||||
|
call <SID>X("pythonFunction", s:blue, "", "")
|
||||||
|
call <SID>X("pythonPreCondit", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:aqua, "", "")
|
||||||
|
call <SID>X("pythonExClass", s:orange, "", "")
|
||||||
|
|
||||||
|
" JavaScript Highlighting
|
||||||
|
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||||
|
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||||
|
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||||
|
|
||||||
|
" HTML Highlighting
|
||||||
|
call <SID>X("htmlTag", s:red, "", "")
|
||||||
|
call <SID>X("htmlTagName", s:red, "", "")
|
||||||
|
call <SID>X("htmlArg", s:red, "", "")
|
||||||
|
call <SID>X("htmlScriptTag", s:red, "", "")
|
||||||
|
|
||||||
|
" Diff Highlighting
|
||||||
|
call <SID>X("diffAdded", s:green, "", "")
|
||||||
|
call <SID>X("diffRemoved", s:red, "", "")
|
||||||
|
|
||||||
|
" Lua Highlighting
|
||||||
|
call <SID>X("luaStatement", s:purple, "", "")
|
||||||
|
call <SID>X("luaRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondStart", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondElseif", s:purple, "", "")
|
||||||
|
call <SID>X("luaCond", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondEnd", s:purple, "", "")
|
||||||
|
|
||||||
|
" Cucumber Highlighting
|
||||||
|
call <SID>X("cucumberGiven", s:blue, "", "")
|
||||||
|
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
||||||
|
|
||||||
|
" Go Highlighting
|
||||||
|
call <SID>X("goDirective", s:purple, "", "")
|
||||||
|
call <SID>X("goDeclaration", s:purple, "", "")
|
||||||
|
call <SID>X("goStatement", s:purple, "", "")
|
||||||
|
call <SID>X("goConditional", s:purple, "", "")
|
||||||
|
call <SID>X("goConstants", s:orange, "", "")
|
||||||
|
call <SID>X("goTodo", s:yellow, "", "")
|
||||||
|
call <SID>X("goDeclType", s:blue, "", "")
|
||||||
|
call <SID>X("goBuiltins", s:purple, "", "")
|
||||||
|
|
||||||
|
" Delete Functions
|
||||||
|
delf <SID>X
|
||||||
|
delf <SID>rgb
|
||||||
|
delf <SID>colour
|
||||||
|
delf <SID>rgb_colour
|
||||||
|
delf <SID>rgb_level
|
||||||
|
delf <SID>rgb_number
|
||||||
|
delf <SID>grey_colour
|
||||||
|
delf <SID>grey_level
|
||||||
|
delf <SID>grey_number
|
||||||
|
endif
|
377
vim/colors/Tomorrow-Night-Bright.vim
Normal file
377
vim/colors/Tomorrow-Night-Bright.vim
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
" Tomorrow Night Bright - Full Colour and 256 Colour
|
||||||
|
" http://chriskempson.com
|
||||||
|
"
|
||||||
|
" Hex colour conversion functions borrowed from the theme "Desert256""
|
||||||
|
|
||||||
|
" Default GUI Colours
|
||||||
|
let s:foreground = "eaeaea"
|
||||||
|
let s:background = "000000"
|
||||||
|
let s:selection = "424242"
|
||||||
|
let s:line = "2a2a2a"
|
||||||
|
let s:comment = "969896"
|
||||||
|
let s:red = "d54e53"
|
||||||
|
let s:orange = "e78c45"
|
||||||
|
let s:yellow = "e7c547"
|
||||||
|
let s:green = "b9ca4a"
|
||||||
|
let s:aqua = "70c0b1"
|
||||||
|
let s:blue = "7aa6da"
|
||||||
|
let s:purple = "c397d8"
|
||||||
|
let s:window = "4d5057"
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
hi clear
|
||||||
|
syntax reset
|
||||||
|
|
||||||
|
let g:colors_name = "Tomorrow-Night-Bright"
|
||||||
|
|
||||||
|
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||||
|
" Returns an approximate grey index for the given grey level
|
||||||
|
fun <SID>grey_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 23
|
||||||
|
return 0
|
||||||
|
elseif a:x < 69
|
||||||
|
return 1
|
||||||
|
elseif a:x < 103
|
||||||
|
return 2
|
||||||
|
elseif a:x < 127
|
||||||
|
return 3
|
||||||
|
elseif a:x < 150
|
||||||
|
return 4
|
||||||
|
elseif a:x < 173
|
||||||
|
return 5
|
||||||
|
elseif a:x < 196
|
||||||
|
return 6
|
||||||
|
elseif a:x < 219
|
||||||
|
return 7
|
||||||
|
elseif a:x < 243
|
||||||
|
return 8
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 14
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 8) / 10
|
||||||
|
let l:m = (a:x - 8) % 10
|
||||||
|
if l:m < 5
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual grey level represented by the grey index
|
||||||
|
fun <SID>grey_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 46
|
||||||
|
elseif a:n == 2
|
||||||
|
return 92
|
||||||
|
elseif a:n == 3
|
||||||
|
return 115
|
||||||
|
elseif a:n == 4
|
||||||
|
return 139
|
||||||
|
elseif a:n == 5
|
||||||
|
return 162
|
||||||
|
elseif a:n == 6
|
||||||
|
return 185
|
||||||
|
elseif a:n == 7
|
||||||
|
return 208
|
||||||
|
elseif a:n == 8
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 8 + (a:n * 10)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given grey index
|
||||||
|
fun <SID>grey_colour(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 9
|
||||||
|
return 79
|
||||||
|
else
|
||||||
|
return 79 + a:n
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 25
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 231 + a:n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns an approximate colour index for the given colour level
|
||||||
|
fun <SID>rgb_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 69
|
||||||
|
return 0
|
||||||
|
elseif a:x < 172
|
||||||
|
return 1
|
||||||
|
elseif a:x < 230
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 3
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 75
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 55) / 40
|
||||||
|
let l:m = (a:x - 55) % 40
|
||||||
|
if l:m < 20
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual colour level for the given colour index
|
||||||
|
fun <SID>rgb_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 139
|
||||||
|
elseif a:n == 2
|
||||||
|
return 205
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 55 + (a:n * 40)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given R/G/B colour indices
|
||||||
|
fun <SID>rgb_colour(x, y, z)
|
||||||
|
if &t_Co == 88
|
||||||
|
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||||
|
else
|
||||||
|
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the given R/G/B colour levels
|
||||||
|
fun <SID>colour(r, g, b)
|
||||||
|
" Get the closest grey
|
||||||
|
let l:gx = <SID>grey_number(a:r)
|
||||||
|
let l:gy = <SID>grey_number(a:g)
|
||||||
|
let l:gz = <SID>grey_number(a:b)
|
||||||
|
|
||||||
|
" Get the closest colour
|
||||||
|
let l:x = <SID>rgb_number(a:r)
|
||||||
|
let l:y = <SID>rgb_number(a:g)
|
||||||
|
let l:z = <SID>rgb_number(a:b)
|
||||||
|
|
||||||
|
if l:gx == l:gy && l:gy == l:gz
|
||||||
|
" There are two possibilities
|
||||||
|
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||||
|
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||||
|
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||||
|
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||||
|
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||||
|
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||||
|
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||||
|
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||||
|
if l:dgrey < l:drgb
|
||||||
|
" Use the grey
|
||||||
|
return <SID>grey_colour(l:gx)
|
||||||
|
else
|
||||||
|
" Use the colour
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Only one possibility
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||||
|
fun <SID>rgb(rgb)
|
||||||
|
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||||
|
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||||
|
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||||
|
|
||||||
|
return <SID>colour(l:r, l:g, l:b)
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Sets the highlighting for the given group
|
||||||
|
fun <SID>X(group, fg, bg, attr)
|
||||||
|
if a:fg != ""
|
||||||
|
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||||
|
endif
|
||||||
|
if a:bg != ""
|
||||||
|
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||||
|
endif
|
||||||
|
if a:attr != ""
|
||||||
|
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("Normal", s:foreground, s:background, "")
|
||||||
|
call <SID>X("LineNr", s:selection, "", "")
|
||||||
|
call <SID>X("NonText", s:selection, "", "")
|
||||||
|
call <SID>X("SpecialKey", s:selection, "", "")
|
||||||
|
call <SID>X("Search", s:background, s:yellow, "")
|
||||||
|
call <SID>X("TabLine", s:foreground, s:background, "reverse")
|
||||||
|
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
||||||
|
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||||
|
call <SID>X("Visual", "", s:selection, "")
|
||||||
|
call <SID>X("Directory", s:blue, "", "")
|
||||||
|
call <SID>X("ModeMsg", s:green, "", "")
|
||||||
|
call <SID>X("MoreMsg", s:green, "", "")
|
||||||
|
call <SID>X("Question", s:green, "", "")
|
||||||
|
call <SID>X("WarningMsg", s:red, "", "")
|
||||||
|
call <SID>X("MatchParen", "", s:selection, "")
|
||||||
|
call <SID>X("Folded", s:comment, s:background, "")
|
||||||
|
call <SID>X("FoldColumn", "", s:background, "")
|
||||||
|
if version >= 700
|
||||||
|
call <SID>X("CursorLine", "", s:line, "none")
|
||||||
|
call <SID>X("CursorColumn", "", s:line, "none")
|
||||||
|
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||||
|
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||||
|
end
|
||||||
|
if version >= 703
|
||||||
|
call <SID>X("ColorColumn", "", s:line, "none")
|
||||||
|
end
|
||||||
|
|
||||||
|
" Standard Highlighting
|
||||||
|
call <SID>X("Comment", s:comment, "", "")
|
||||||
|
call <SID>X("Todo", s:comment, s:background, "")
|
||||||
|
call <SID>X("Title", s:comment, "", "")
|
||||||
|
call <SID>X("Identifier", s:red, "", "none")
|
||||||
|
call <SID>X("Statement", s:foreground, "", "")
|
||||||
|
call <SID>X("Conditional", s:foreground, "", "")
|
||||||
|
call <SID>X("Repeat", s:foreground, "", "")
|
||||||
|
call <SID>X("Structure", s:purple, "", "")
|
||||||
|
call <SID>X("Function", s:blue, "", "")
|
||||||
|
call <SID>X("Constant", s:orange, "", "")
|
||||||
|
call <SID>X("String", s:green, "", "")
|
||||||
|
call <SID>X("Special", s:foreground, "", "")
|
||||||
|
call <SID>X("PreProc", s:purple, "", "")
|
||||||
|
call <SID>X("Operator", s:aqua, "", "none")
|
||||||
|
call <SID>X("Type", s:blue, "", "none")
|
||||||
|
call <SID>X("Define", s:purple, "", "none")
|
||||||
|
call <SID>X("Include", s:blue, "", "")
|
||||||
|
"call <SID>X("Ignore", "666666", "", "")
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("vimCommand", s:red, "", "none")
|
||||||
|
|
||||||
|
" C Highlighting
|
||||||
|
call <SID>X("cType", s:yellow, "", "")
|
||||||
|
call <SID>X("cStorageClass", s:purple, "", "")
|
||||||
|
call <SID>X("cConditional", s:purple, "", "")
|
||||||
|
call <SID>X("cRepeat", s:purple, "", "")
|
||||||
|
|
||||||
|
" PHP Highlighting
|
||||||
|
call <SID>X("phpVarSelector", s:red, "", "")
|
||||||
|
call <SID>X("phpKeyword", s:purple, "", "")
|
||||||
|
call <SID>X("phpRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("phpConditional", s:purple, "", "")
|
||||||
|
call <SID>X("phpStatement", s:purple, "", "")
|
||||||
|
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||||
|
|
||||||
|
" Ruby Highlighting
|
||||||
|
call <SID>X("rubySymbol", s:green, "", "")
|
||||||
|
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAccess", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||||
|
call <SID>X("rubyInclude", s:blue, "", "")
|
||||||
|
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||||
|
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||||
|
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||||
|
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||||
|
call <SID>X("rubyConditional", s:purple, "", "")
|
||||||
|
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("rubyControl", s:purple, "", "")
|
||||||
|
call <SID>X("rubyException", s:purple, "", "")
|
||||||
|
|
||||||
|
" Python Highlighting
|
||||||
|
call <SID>X("pythonInclude", s:purple, "", "")
|
||||||
|
call <SID>X("pythonStatement", s:purple, "", "")
|
||||||
|
call <SID>X("pythonConditional", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("pythonException", s:purple, "", "")
|
||||||
|
call <SID>X("pythonFunction", s:blue, "", "")
|
||||||
|
call <SID>X("pythonPreCondit", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:aqua, "", "")
|
||||||
|
call <SID>X("pythonExClass", s:orange, "", "")
|
||||||
|
|
||||||
|
" JavaScript Highlighting
|
||||||
|
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||||
|
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||||
|
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||||
|
|
||||||
|
" HTML Highlighting
|
||||||
|
call <SID>X("htmlTag", s:red, "", "")
|
||||||
|
call <SID>X("htmlTagName", s:red, "", "")
|
||||||
|
call <SID>X("htmlArg", s:red, "", "")
|
||||||
|
call <SID>X("htmlScriptTag", s:red, "", "")
|
||||||
|
|
||||||
|
" Diff Highlighting
|
||||||
|
call <SID>X("diffAdded", s:green, "", "")
|
||||||
|
call <SID>X("diffRemoved", s:red, "", "")
|
||||||
|
|
||||||
|
" Lua Highlighting
|
||||||
|
call <SID>X("luaStatement", s:purple, "", "")
|
||||||
|
call <SID>X("luaRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondStart", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondElseif", s:purple, "", "")
|
||||||
|
call <SID>X("luaCond", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondEnd", s:purple, "", "")
|
||||||
|
|
||||||
|
" Cucumber Highlighting
|
||||||
|
call <SID>X("cucumberGiven", s:blue, "", "")
|
||||||
|
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
||||||
|
|
||||||
|
" Go Highlighting
|
||||||
|
call <SID>X("goDirective", s:purple, "", "")
|
||||||
|
call <SID>X("goDeclaration", s:purple, "", "")
|
||||||
|
call <SID>X("goStatement", s:purple, "", "")
|
||||||
|
call <SID>X("goConditional", s:purple, "", "")
|
||||||
|
call <SID>X("goConstants", s:orange, "", "")
|
||||||
|
call <SID>X("goTodo", s:yellow, "", "")
|
||||||
|
call <SID>X("goDeclType", s:blue, "", "")
|
||||||
|
call <SID>X("goBuiltins", s:purple, "", "")
|
||||||
|
|
||||||
|
" Delete Functions
|
||||||
|
delf <SID>X
|
||||||
|
delf <SID>rgb
|
||||||
|
delf <SID>colour
|
||||||
|
delf <SID>rgb_colour
|
||||||
|
delf <SID>rgb_level
|
||||||
|
delf <SID>rgb_number
|
||||||
|
delf <SID>grey_colour
|
||||||
|
delf <SID>grey_level
|
||||||
|
delf <SID>grey_number
|
||||||
|
endif
|
377
vim/colors/Tomorrow-Night-Eighties.vim
Normal file
377
vim/colors/Tomorrow-Night-Eighties.vim
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
" Tomorrow Night Eighties - Full Colour and 256 Colour
|
||||||
|
" http://chriskempson.com
|
||||||
|
"
|
||||||
|
" Hex colour conversion functions borrowed from the theme "Desert256""
|
||||||
|
|
||||||
|
" Default GUI Colours
|
||||||
|
let s:foreground = "cccccc"
|
||||||
|
let s:background = "2d2d2d"
|
||||||
|
let s:selection = "515151"
|
||||||
|
let s:line = "393939"
|
||||||
|
let s:comment = "999999"
|
||||||
|
let s:red = "f2777a"
|
||||||
|
let s:orange = "f99157"
|
||||||
|
let s:yellow = "ffcc66"
|
||||||
|
let s:green = "99cc99"
|
||||||
|
let s:aqua = "009999"
|
||||||
|
let s:blue = "99cccc"
|
||||||
|
let s:purple = "cc99cc"
|
||||||
|
let s:window = "4d5057"
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
hi clear
|
||||||
|
syntax reset
|
||||||
|
|
||||||
|
let g:colors_name = "Tomorrow-Night-Eighties"
|
||||||
|
|
||||||
|
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||||
|
" Returns an approximate grey index for the given grey level
|
||||||
|
fun <SID>grey_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 23
|
||||||
|
return 0
|
||||||
|
elseif a:x < 69
|
||||||
|
return 1
|
||||||
|
elseif a:x < 103
|
||||||
|
return 2
|
||||||
|
elseif a:x < 127
|
||||||
|
return 3
|
||||||
|
elseif a:x < 150
|
||||||
|
return 4
|
||||||
|
elseif a:x < 173
|
||||||
|
return 5
|
||||||
|
elseif a:x < 196
|
||||||
|
return 6
|
||||||
|
elseif a:x < 219
|
||||||
|
return 7
|
||||||
|
elseif a:x < 243
|
||||||
|
return 8
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 14
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 8) / 10
|
||||||
|
let l:m = (a:x - 8) % 10
|
||||||
|
if l:m < 5
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual grey level represented by the grey index
|
||||||
|
fun <SID>grey_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 46
|
||||||
|
elseif a:n == 2
|
||||||
|
return 92
|
||||||
|
elseif a:n == 3
|
||||||
|
return 115
|
||||||
|
elseif a:n == 4
|
||||||
|
return 139
|
||||||
|
elseif a:n == 5
|
||||||
|
return 162
|
||||||
|
elseif a:n == 6
|
||||||
|
return 185
|
||||||
|
elseif a:n == 7
|
||||||
|
return 208
|
||||||
|
elseif a:n == 8
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 8 + (a:n * 10)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given grey index
|
||||||
|
fun <SID>grey_colour(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 9
|
||||||
|
return 79
|
||||||
|
else
|
||||||
|
return 79 + a:n
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 25
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 231 + a:n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns an approximate colour index for the given colour level
|
||||||
|
fun <SID>rgb_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 69
|
||||||
|
return 0
|
||||||
|
elseif a:x < 172
|
||||||
|
return 1
|
||||||
|
elseif a:x < 230
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 3
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 75
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 55) / 40
|
||||||
|
let l:m = (a:x - 55) % 40
|
||||||
|
if l:m < 20
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual colour level for the given colour index
|
||||||
|
fun <SID>rgb_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 139
|
||||||
|
elseif a:n == 2
|
||||||
|
return 205
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 55 + (a:n * 40)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given R/G/B colour indices
|
||||||
|
fun <SID>rgb_colour(x, y, z)
|
||||||
|
if &t_Co == 88
|
||||||
|
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||||
|
else
|
||||||
|
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the given R/G/B colour levels
|
||||||
|
fun <SID>colour(r, g, b)
|
||||||
|
" Get the closest grey
|
||||||
|
let l:gx = <SID>grey_number(a:r)
|
||||||
|
let l:gy = <SID>grey_number(a:g)
|
||||||
|
let l:gz = <SID>grey_number(a:b)
|
||||||
|
|
||||||
|
" Get the closest colour
|
||||||
|
let l:x = <SID>rgb_number(a:r)
|
||||||
|
let l:y = <SID>rgb_number(a:g)
|
||||||
|
let l:z = <SID>rgb_number(a:b)
|
||||||
|
|
||||||
|
if l:gx == l:gy && l:gy == l:gz
|
||||||
|
" There are two possibilities
|
||||||
|
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||||
|
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||||
|
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||||
|
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||||
|
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||||
|
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||||
|
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||||
|
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||||
|
if l:dgrey < l:drgb
|
||||||
|
" Use the grey
|
||||||
|
return <SID>grey_colour(l:gx)
|
||||||
|
else
|
||||||
|
" Use the colour
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Only one possibility
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||||
|
fun <SID>rgb(rgb)
|
||||||
|
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||||
|
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||||
|
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||||
|
|
||||||
|
return <SID>colour(l:r, l:g, l:b)
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Sets the highlighting for the given group
|
||||||
|
fun <SID>X(group, fg, bg, attr)
|
||||||
|
if a:fg != ""
|
||||||
|
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||||
|
endif
|
||||||
|
if a:bg != ""
|
||||||
|
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||||
|
endif
|
||||||
|
if a:attr != ""
|
||||||
|
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("Normal", s:foreground, s:background, "")
|
||||||
|
call <SID>X("LineNr", s:selection, "", "")
|
||||||
|
call <SID>X("NonText", s:selection, "", "")
|
||||||
|
call <SID>X("SpecialKey", s:selection, "", "")
|
||||||
|
call <SID>X("Search", s:background, s:yellow, "")
|
||||||
|
call <SID>X("TabLine", s:foreground, s:background, "reverse")
|
||||||
|
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
||||||
|
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||||
|
call <SID>X("Visual", "", s:selection, "")
|
||||||
|
call <SID>X("Directory", s:blue, "", "")
|
||||||
|
call <SID>X("ModeMsg", s:green, "", "")
|
||||||
|
call <SID>X("MoreMsg", s:green, "", "")
|
||||||
|
call <SID>X("Question", s:green, "", "")
|
||||||
|
call <SID>X("WarningMsg", s:red, "", "")
|
||||||
|
call <SID>X("MatchParen", "", s:selection, "")
|
||||||
|
call <SID>X("Folded", s:comment, s:background, "")
|
||||||
|
call <SID>X("FoldColumn", "", s:background, "")
|
||||||
|
if version >= 700
|
||||||
|
call <SID>X("CursorLine", "", s:line, "none")
|
||||||
|
call <SID>X("CursorColumn", "", s:line, "none")
|
||||||
|
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||||
|
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||||
|
end
|
||||||
|
if version >= 703
|
||||||
|
call <SID>X("ColorColumn", "", s:line, "none")
|
||||||
|
end
|
||||||
|
|
||||||
|
" Standard Highlighting
|
||||||
|
call <SID>X("Comment", s:comment, "", "")
|
||||||
|
call <SID>X("Todo", s:comment, s:background, "")
|
||||||
|
call <SID>X("Title", s:comment, "", "")
|
||||||
|
call <SID>X("Identifier", s:red, "", "none")
|
||||||
|
call <SID>X("Statement", s:foreground, "", "")
|
||||||
|
call <SID>X("Conditional", s:foreground, "", "")
|
||||||
|
call <SID>X("Repeat", s:foreground, "", "")
|
||||||
|
call <SID>X("Structure", s:purple, "", "")
|
||||||
|
call <SID>X("Function", s:blue, "", "")
|
||||||
|
call <SID>X("Constant", s:orange, "", "")
|
||||||
|
call <SID>X("String", s:green, "", "")
|
||||||
|
call <SID>X("Special", s:foreground, "", "")
|
||||||
|
call <SID>X("PreProc", s:purple, "", "")
|
||||||
|
call <SID>X("Operator", s:aqua, "", "none")
|
||||||
|
call <SID>X("Type", s:blue, "", "none")
|
||||||
|
call <SID>X("Define", s:purple, "", "none")
|
||||||
|
call <SID>X("Include", s:blue, "", "")
|
||||||
|
"call <SID>X("Ignore", "666666", "", "")
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("vimCommand", s:red, "", "none")
|
||||||
|
|
||||||
|
" C Highlighting
|
||||||
|
call <SID>X("cType", s:yellow, "", "")
|
||||||
|
call <SID>X("cStorageClass", s:purple, "", "")
|
||||||
|
call <SID>X("cConditional", s:purple, "", "")
|
||||||
|
call <SID>X("cRepeat", s:purple, "", "")
|
||||||
|
|
||||||
|
" PHP Highlighting
|
||||||
|
call <SID>X("phpVarSelector", s:red, "", "")
|
||||||
|
call <SID>X("phpKeyword", s:purple, "", "")
|
||||||
|
call <SID>X("phpRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("phpConditional", s:purple, "", "")
|
||||||
|
call <SID>X("phpStatement", s:purple, "", "")
|
||||||
|
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||||
|
|
||||||
|
" Ruby Highlighting
|
||||||
|
call <SID>X("rubySymbol", s:green, "", "")
|
||||||
|
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAccess", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||||
|
call <SID>X("rubyInclude", s:blue, "", "")
|
||||||
|
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||||
|
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||||
|
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||||
|
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||||
|
call <SID>X("rubyConditional", s:purple, "", "")
|
||||||
|
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("rubyControl", s:purple, "", "")
|
||||||
|
call <SID>X("rubyException", s:purple, "", "")
|
||||||
|
|
||||||
|
" Python Highlighting
|
||||||
|
call <SID>X("pythonInclude", s:purple, "", "")
|
||||||
|
call <SID>X("pythonStatement", s:purple, "", "")
|
||||||
|
call <SID>X("pythonConditional", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("pythonException", s:purple, "", "")
|
||||||
|
call <SID>X("pythonFunction", s:blue, "", "")
|
||||||
|
call <SID>X("pythonPreCondit", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:aqua, "", "")
|
||||||
|
call <SID>X("pythonExClass", s:orange, "", "")
|
||||||
|
|
||||||
|
" JavaScript Highlighting
|
||||||
|
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||||
|
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||||
|
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||||
|
|
||||||
|
" HTML Highlighting
|
||||||
|
call <SID>X("htmlTag", s:red, "", "")
|
||||||
|
call <SID>X("htmlTagName", s:red, "", "")
|
||||||
|
call <SID>X("htmlArg", s:red, "", "")
|
||||||
|
call <SID>X("htmlScriptTag", s:red, "", "")
|
||||||
|
|
||||||
|
" Diff Highlighting
|
||||||
|
call <SID>X("diffAdded", s:green, "", "")
|
||||||
|
call <SID>X("diffRemoved", s:red, "", "")
|
||||||
|
|
||||||
|
" Lua Highlighting
|
||||||
|
call <SID>X("luaStatement", s:purple, "", "")
|
||||||
|
call <SID>X("luaRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondStart", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondElseif", s:purple, "", "")
|
||||||
|
call <SID>X("luaCond", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondEnd", s:purple, "", "")
|
||||||
|
|
||||||
|
" Cucumber Highlighting
|
||||||
|
call <SID>X("cucumberGiven", s:blue, "", "")
|
||||||
|
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
||||||
|
|
||||||
|
" Go Highlighting
|
||||||
|
call <SID>X("goDirective", s:purple, "", "")
|
||||||
|
call <SID>X("goDeclaration", s:purple, "", "")
|
||||||
|
call <SID>X("goStatement", s:purple, "", "")
|
||||||
|
call <SID>X("goConditional", s:purple, "", "")
|
||||||
|
call <SID>X("goConstants", s:orange, "", "")
|
||||||
|
call <SID>X("goTodo", s:yellow, "", "")
|
||||||
|
call <SID>X("goDeclType", s:blue, "", "")
|
||||||
|
call <SID>X("goBuiltins", s:purple, "", "")
|
||||||
|
|
||||||
|
" Delete Functions
|
||||||
|
delf <SID>X
|
||||||
|
delf <SID>rgb
|
||||||
|
delf <SID>colour
|
||||||
|
delf <SID>rgb_colour
|
||||||
|
delf <SID>rgb_level
|
||||||
|
delf <SID>rgb_number
|
||||||
|
delf <SID>grey_colour
|
||||||
|
delf <SID>grey_level
|
||||||
|
delf <SID>grey_number
|
||||||
|
endif
|
393
vim/colors/Tomorrow-Night.vim
Normal file
393
vim/colors/Tomorrow-Night.vim
Normal file
@ -0,0 +1,393 @@
|
|||||||
|
" Tomorrow Night - Full Colour and 256 Colour
|
||||||
|
" http://chriskempson.com
|
||||||
|
"
|
||||||
|
" Hex colour conversion functions borrowed from the theme "Desert256""
|
||||||
|
|
||||||
|
" Default GUI Colours
|
||||||
|
let s:foreground = "c5c8c6"
|
||||||
|
let s:background = "1d1f21"
|
||||||
|
let s:selection = "373b41"
|
||||||
|
let s:line = "282a2e"
|
||||||
|
let s:comment = "969896"
|
||||||
|
let s:red = "cc6666"
|
||||||
|
let s:orange = "de935f"
|
||||||
|
let s:yellow = "f0c674"
|
||||||
|
let s:green = "b5bd68"
|
||||||
|
let s:aqua = "8abeb7"
|
||||||
|
let s:blue = "81a2be"
|
||||||
|
let s:purple = "b294bb"
|
||||||
|
let s:window = "4d5057"
|
||||||
|
|
||||||
|
" Console 256 Colours
|
||||||
|
if !has("gui_running")
|
||||||
|
let s:background = "303030"
|
||||||
|
let s:window = "5e5e5e"
|
||||||
|
let s:line = "3a3a3a"
|
||||||
|
let s:selection = "585858"
|
||||||
|
end
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
hi clear
|
||||||
|
syntax reset
|
||||||
|
|
||||||
|
let g:colors_name = "Tomorrow-Night"
|
||||||
|
|
||||||
|
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||||
|
" Returns an approximate grey index for the given grey level
|
||||||
|
fun <SID>grey_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 23
|
||||||
|
return 0
|
||||||
|
elseif a:x < 69
|
||||||
|
return 1
|
||||||
|
elseif a:x < 103
|
||||||
|
return 2
|
||||||
|
elseif a:x < 127
|
||||||
|
return 3
|
||||||
|
elseif a:x < 150
|
||||||
|
return 4
|
||||||
|
elseif a:x < 173
|
||||||
|
return 5
|
||||||
|
elseif a:x < 196
|
||||||
|
return 6
|
||||||
|
elseif a:x < 219
|
||||||
|
return 7
|
||||||
|
elseif a:x < 243
|
||||||
|
return 8
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 14
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 8) / 10
|
||||||
|
let l:m = (a:x - 8) % 10
|
||||||
|
if l:m < 5
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual grey level represented by the grey index
|
||||||
|
fun <SID>grey_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 46
|
||||||
|
elseif a:n == 2
|
||||||
|
return 92
|
||||||
|
elseif a:n == 3
|
||||||
|
return 115
|
||||||
|
elseif a:n == 4
|
||||||
|
return 139
|
||||||
|
elseif a:n == 5
|
||||||
|
return 162
|
||||||
|
elseif a:n == 6
|
||||||
|
return 185
|
||||||
|
elseif a:n == 7
|
||||||
|
return 208
|
||||||
|
elseif a:n == 8
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 8 + (a:n * 10)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given grey index
|
||||||
|
fun <SID>grey_colour(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 9
|
||||||
|
return 79
|
||||||
|
else
|
||||||
|
return 79 + a:n
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 25
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 231 + a:n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns an approximate colour index for the given colour level
|
||||||
|
fun <SID>rgb_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 69
|
||||||
|
return 0
|
||||||
|
elseif a:x < 172
|
||||||
|
return 1
|
||||||
|
elseif a:x < 230
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 3
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 75
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 55) / 40
|
||||||
|
let l:m = (a:x - 55) % 40
|
||||||
|
if l:m < 20
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual colour level for the given colour index
|
||||||
|
fun <SID>rgb_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 139
|
||||||
|
elseif a:n == 2
|
||||||
|
return 205
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 55 + (a:n * 40)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given R/G/B colour indices
|
||||||
|
fun <SID>rgb_colour(x, y, z)
|
||||||
|
if &t_Co == 88
|
||||||
|
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||||
|
else
|
||||||
|
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the given R/G/B colour levels
|
||||||
|
fun <SID>colour(r, g, b)
|
||||||
|
" Get the closest grey
|
||||||
|
let l:gx = <SID>grey_number(a:r)
|
||||||
|
let l:gy = <SID>grey_number(a:g)
|
||||||
|
let l:gz = <SID>grey_number(a:b)
|
||||||
|
|
||||||
|
" Get the closest colour
|
||||||
|
let l:x = <SID>rgb_number(a:r)
|
||||||
|
let l:y = <SID>rgb_number(a:g)
|
||||||
|
let l:z = <SID>rgb_number(a:b)
|
||||||
|
|
||||||
|
if l:gx == l:gy && l:gy == l:gz
|
||||||
|
" There are two possibilities
|
||||||
|
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||||
|
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||||
|
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||||
|
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||||
|
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||||
|
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||||
|
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||||
|
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||||
|
if l:dgrey < l:drgb
|
||||||
|
" Use the grey
|
||||||
|
return <SID>grey_colour(l:gx)
|
||||||
|
else
|
||||||
|
" Use the colour
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Only one possibility
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||||
|
fun <SID>rgb(rgb)
|
||||||
|
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||||
|
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||||
|
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||||
|
|
||||||
|
return <SID>colour(l:r, l:g, l:b)
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Sets the highlighting for the given group
|
||||||
|
fun <SID>X(group, fg, bg, attr)
|
||||||
|
if a:fg != ""
|
||||||
|
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||||
|
endif
|
||||||
|
if a:bg != ""
|
||||||
|
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||||
|
endif
|
||||||
|
if a:attr != ""
|
||||||
|
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("Normal", s:foreground, s:background, "")
|
||||||
|
call <SID>X("LineNr", s:selection, "", "")
|
||||||
|
call <SID>X("NonText", s:selection, "", "")
|
||||||
|
call <SID>X("SpecialKey", s:selection, "", "")
|
||||||
|
call <SID>X("Search", s:background, s:yellow, "")
|
||||||
|
call <SID>X("TabLine", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("TabLineFill", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
||||||
|
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||||
|
call <SID>X("Visual", "", s:selection, "")
|
||||||
|
call <SID>X("Directory", s:blue, "", "")
|
||||||
|
call <SID>X("ModeMsg", s:green, "", "")
|
||||||
|
call <SID>X("MoreMsg", s:green, "", "")
|
||||||
|
call <SID>X("Question", s:green, "", "")
|
||||||
|
call <SID>X("WarningMsg", s:red, "", "")
|
||||||
|
call <SID>X("MatchParen", "", s:selection, "")
|
||||||
|
call <SID>X("Folded", s:comment, s:background, "")
|
||||||
|
call <SID>X("FoldColumn", "", s:background, "")
|
||||||
|
if version >= 700
|
||||||
|
call <SID>X("CursorLine", "", s:line, "none")
|
||||||
|
call <SID>X("CursorColumn", "", s:line, "none")
|
||||||
|
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||||
|
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||||
|
call <SID>X("SignColumn", "", s:background, "none")
|
||||||
|
end
|
||||||
|
if version >= 703
|
||||||
|
call <SID>X("ColorColumn", "", s:line, "none")
|
||||||
|
end
|
||||||
|
|
||||||
|
" Standard Highlighting
|
||||||
|
call <SID>X("Comment", s:comment, "", "")
|
||||||
|
call <SID>X("Todo", s:comment, s:background, "")
|
||||||
|
call <SID>X("Title", s:comment, "", "")
|
||||||
|
call <SID>X("Identifier", s:red, "", "none")
|
||||||
|
call <SID>X("Statement", s:foreground, "", "")
|
||||||
|
call <SID>X("Conditional", s:foreground, "", "")
|
||||||
|
call <SID>X("Repeat", s:foreground, "", "")
|
||||||
|
call <SID>X("Structure", s:purple, "", "")
|
||||||
|
call <SID>X("Function", s:blue, "", "")
|
||||||
|
call <SID>X("Constant", s:orange, "", "")
|
||||||
|
call <SID>X("String", s:green, "", "")
|
||||||
|
call <SID>X("Special", s:foreground, "", "")
|
||||||
|
call <SID>X("PreProc", s:purple, "", "")
|
||||||
|
call <SID>X("Operator", s:aqua, "", "none")
|
||||||
|
call <SID>X("Type", s:blue, "", "none")
|
||||||
|
call <SID>X("Define", s:purple, "", "none")
|
||||||
|
call <SID>X("Include", s:blue, "", "")
|
||||||
|
"call <SID>X("Ignore", "666666", "", "")
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("vimCommand", s:red, "", "none")
|
||||||
|
|
||||||
|
" C Highlighting
|
||||||
|
call <SID>X("cType", s:yellow, "", "")
|
||||||
|
call <SID>X("cStorageClass", s:purple, "", "")
|
||||||
|
call <SID>X("cConditional", s:purple, "", "")
|
||||||
|
call <SID>X("cRepeat", s:purple, "", "")
|
||||||
|
|
||||||
|
" PHP Highlighting
|
||||||
|
call <SID>X("phpVarSelector", s:red, "", "")
|
||||||
|
call <SID>X("phpKeyword", s:purple, "", "")
|
||||||
|
call <SID>X("phpRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("phpConditional", s:purple, "", "")
|
||||||
|
call <SID>X("phpStatement", s:purple, "", "")
|
||||||
|
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||||
|
|
||||||
|
" Ruby Highlighting
|
||||||
|
call <SID>X("rubySymbol", s:green, "", "")
|
||||||
|
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAccess", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||||
|
call <SID>X("rubyInclude", s:blue, "", "")
|
||||||
|
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||||
|
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||||
|
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||||
|
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||||
|
call <SID>X("rubyConditional", s:purple, "", "")
|
||||||
|
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("rubyControl", s:purple, "", "")
|
||||||
|
call <SID>X("rubyException", s:purple, "", "")
|
||||||
|
|
||||||
|
" Python Highlighting
|
||||||
|
call <SID>X("pythonInclude", s:purple, "", "")
|
||||||
|
call <SID>X("pythonStatement", s:purple, "", "")
|
||||||
|
call <SID>X("pythonConditional", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("pythonException", s:purple, "", "")
|
||||||
|
call <SID>X("pythonFunction", s:blue, "", "")
|
||||||
|
call <SID>X("pythonPreCondit", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:aqua, "", "")
|
||||||
|
call <SID>X("pythonExClass", s:orange, "", "")
|
||||||
|
|
||||||
|
" JavaScript Highlighting
|
||||||
|
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||||
|
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||||
|
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||||
|
|
||||||
|
" HTML Highlighting
|
||||||
|
call <SID>X("htmlTag", s:red, "", "")
|
||||||
|
call <SID>X("htmlTagName", s:red, "", "")
|
||||||
|
call <SID>X("htmlArg", s:red, "", "")
|
||||||
|
call <SID>X("htmlScriptTag", s:red, "", "")
|
||||||
|
|
||||||
|
" Diff Highlighting
|
||||||
|
call <SID>X("diffAdded", s:green, "", "")
|
||||||
|
call <SID>X("diffRemoved", s:red, "", "")
|
||||||
|
|
||||||
|
" ShowMarks Highlighting
|
||||||
|
call <SID>X("ShowMarksHLl", s:orange, s:background, "none")
|
||||||
|
call <SID>X("ShowMarksHLo", s:purple, s:background, "none")
|
||||||
|
call <SID>X("ShowMarksHLu", s:yellow, s:background, "none")
|
||||||
|
call <SID>X("ShowMarksHLm", s:aqua, s:background, "none")
|
||||||
|
|
||||||
|
" Cucumber Highlighting
|
||||||
|
call <SID>X("cucumberGiven", s:blue, "", "")
|
||||||
|
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
||||||
|
|
||||||
|
" Go Highlighting
|
||||||
|
call <SID>X("goDirective", s:purple, "", "")
|
||||||
|
call <SID>X("goDeclaration", s:purple, "", "")
|
||||||
|
call <SID>X("goStatement", s:purple, "", "")
|
||||||
|
call <SID>X("goConditional", s:purple, "", "")
|
||||||
|
call <SID>X("goConstants", s:orange, "", "")
|
||||||
|
call <SID>X("goTodo", s:yellow, "", "")
|
||||||
|
call <SID>X("goDeclType", s:blue, "", "")
|
||||||
|
call <SID>X("goBuiltins", s:purple, "", "")
|
||||||
|
|
||||||
|
" Lua Highlighting
|
||||||
|
call <SID>X("luaStatement", s:purple, "", "")
|
||||||
|
call <SID>X("luaRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondStart", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondElseif", s:purple, "", "")
|
||||||
|
call <SID>X("luaCond", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondEnd", s:purple, "", "")
|
||||||
|
|
||||||
|
" Delete Functions
|
||||||
|
delf <SID>X
|
||||||
|
delf <SID>rgb
|
||||||
|
delf <SID>colour
|
||||||
|
delf <SID>rgb_colour
|
||||||
|
delf <SID>rgb_level
|
||||||
|
delf <SID>rgb_number
|
||||||
|
delf <SID>grey_colour
|
||||||
|
delf <SID>grey_level
|
||||||
|
delf <SID>grey_number
|
||||||
|
endif
|
377
vim/colors/Tomorrow.vim
Normal file
377
vim/colors/Tomorrow.vim
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
" Tomorrow - Full Colour and 256 Colour
|
||||||
|
" http://chriskempson.com
|
||||||
|
"
|
||||||
|
" Hex colour conversion functions borrowed from the theme "Desert256""
|
||||||
|
|
||||||
|
" Default GUI Colours
|
||||||
|
let s:foreground = "4d4d4c"
|
||||||
|
let s:background = "fafafa"
|
||||||
|
let s:selection = "d6d6d6"
|
||||||
|
let s:line = "efefef"
|
||||||
|
let s:comment = "8e908c"
|
||||||
|
let s:red = "c82829"
|
||||||
|
let s:orange = "f5871f"
|
||||||
|
let s:yellow = "eab700"
|
||||||
|
let s:green = "718c00"
|
||||||
|
let s:aqua = "3e999f"
|
||||||
|
let s:blue = "4271ae"
|
||||||
|
let s:purple = "8959a8"
|
||||||
|
let s:window = "efefef"
|
||||||
|
|
||||||
|
set background=light
|
||||||
|
hi clear
|
||||||
|
syntax reset
|
||||||
|
|
||||||
|
let g:colors_name = "Tomorrow"
|
||||||
|
|
||||||
|
if has("gui_running") || &t_Co == 88 || &t_Co == 256
|
||||||
|
" Returns an approximate grey index for the given grey level
|
||||||
|
fun <SID>grey_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 23
|
||||||
|
return 0
|
||||||
|
elseif a:x < 69
|
||||||
|
return 1
|
||||||
|
elseif a:x < 103
|
||||||
|
return 2
|
||||||
|
elseif a:x < 127
|
||||||
|
return 3
|
||||||
|
elseif a:x < 150
|
||||||
|
return 4
|
||||||
|
elseif a:x < 173
|
||||||
|
return 5
|
||||||
|
elseif a:x < 196
|
||||||
|
return 6
|
||||||
|
elseif a:x < 219
|
||||||
|
return 7
|
||||||
|
elseif a:x < 243
|
||||||
|
return 8
|
||||||
|
else
|
||||||
|
return 9
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 14
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 8) / 10
|
||||||
|
let l:m = (a:x - 8) % 10
|
||||||
|
if l:m < 5
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual grey level represented by the grey index
|
||||||
|
fun <SID>grey_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 46
|
||||||
|
elseif a:n == 2
|
||||||
|
return 92
|
||||||
|
elseif a:n == 3
|
||||||
|
return 115
|
||||||
|
elseif a:n == 4
|
||||||
|
return 139
|
||||||
|
elseif a:n == 5
|
||||||
|
return 162
|
||||||
|
elseif a:n == 6
|
||||||
|
return 185
|
||||||
|
elseif a:n == 7
|
||||||
|
return 208
|
||||||
|
elseif a:n == 8
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 8 + (a:n * 10)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given grey index
|
||||||
|
fun <SID>grey_colour(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 9
|
||||||
|
return 79
|
||||||
|
else
|
||||||
|
return 79 + a:n
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 16
|
||||||
|
elseif a:n == 25
|
||||||
|
return 231
|
||||||
|
else
|
||||||
|
return 231 + a:n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns an approximate colour index for the given colour level
|
||||||
|
fun <SID>rgb_number(x)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:x < 69
|
||||||
|
return 0
|
||||||
|
elseif a:x < 172
|
||||||
|
return 1
|
||||||
|
elseif a:x < 230
|
||||||
|
return 2
|
||||||
|
else
|
||||||
|
return 3
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:x < 75
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
let l:n = (a:x - 55) / 40
|
||||||
|
let l:m = (a:x - 55) % 40
|
||||||
|
if l:m < 20
|
||||||
|
return l:n
|
||||||
|
else
|
||||||
|
return l:n + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the actual colour level for the given colour index
|
||||||
|
fun <SID>rgb_level(n)
|
||||||
|
if &t_Co == 88
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
elseif a:n == 1
|
||||||
|
return 139
|
||||||
|
elseif a:n == 2
|
||||||
|
return 205
|
||||||
|
else
|
||||||
|
return 255
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
if a:n == 0
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 55 + (a:n * 40)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index for the given R/G/B colour indices
|
||||||
|
fun <SID>rgb_colour(x, y, z)
|
||||||
|
if &t_Co == 88
|
||||||
|
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||||
|
else
|
||||||
|
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the given R/G/B colour levels
|
||||||
|
fun <SID>colour(r, g, b)
|
||||||
|
" Get the closest grey
|
||||||
|
let l:gx = <SID>grey_number(a:r)
|
||||||
|
let l:gy = <SID>grey_number(a:g)
|
||||||
|
let l:gz = <SID>grey_number(a:b)
|
||||||
|
|
||||||
|
" Get the closest colour
|
||||||
|
let l:x = <SID>rgb_number(a:r)
|
||||||
|
let l:y = <SID>rgb_number(a:g)
|
||||||
|
let l:z = <SID>rgb_number(a:b)
|
||||||
|
|
||||||
|
if l:gx == l:gy && l:gy == l:gz
|
||||||
|
" There are two possibilities
|
||||||
|
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||||
|
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||||
|
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||||
|
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||||
|
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||||
|
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||||
|
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||||
|
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||||
|
if l:dgrey < l:drgb
|
||||||
|
" Use the grey
|
||||||
|
return <SID>grey_colour(l:gx)
|
||||||
|
else
|
||||||
|
" Use the colour
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Only one possibility
|
||||||
|
return <SID>rgb_colour(l:x, l:y, l:z)
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Returns the palette index to approximate the 'rrggbb' hex string
|
||||||
|
fun <SID>rgb(rgb)
|
||||||
|
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
|
||||||
|
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
|
||||||
|
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
|
||||||
|
|
||||||
|
return <SID>colour(l:r, l:g, l:b)
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Sets the highlighting for the given group
|
||||||
|
fun <SID>X(group, fg, bg, attr)
|
||||||
|
if a:fg != ""
|
||||||
|
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||||
|
endif
|
||||||
|
if a:bg != ""
|
||||||
|
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||||
|
endif
|
||||||
|
if a:attr != ""
|
||||||
|
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
|
||||||
|
endif
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("Normal", s:foreground, s:background, "")
|
||||||
|
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE
|
||||||
|
call <SID>X("NonText", s:selection, "", "")
|
||||||
|
call <SID>X("SpecialKey", s:selection, "", "")
|
||||||
|
call <SID>X("Search", s:foreground, s:yellow, "")
|
||||||
|
call <SID>X("TabLine", s:foreground, s:background, "reverse")
|
||||||
|
call <SID>X("StatusLine", s:window, s:yellow, "reverse")
|
||||||
|
call <SID>X("StatusLineNC", s:window, s:foreground, "reverse")
|
||||||
|
call <SID>X("VertSplit", s:window, s:window, "none")
|
||||||
|
call <SID>X("Visual", "", s:selection, "")
|
||||||
|
call <SID>X("Directory", s:blue, "", "")
|
||||||
|
call <SID>X("ModeMsg", s:green, "", "")
|
||||||
|
call <SID>X("MoreMsg", s:green, "", "")
|
||||||
|
call <SID>X("Question", s:green, "", "")
|
||||||
|
call <SID>X("WarningMsg", s:red, "", "")
|
||||||
|
call <SID>X("MatchParen", "", s:selection, "")
|
||||||
|
call <SID>X("Folded", s:comment, s:background, "")
|
||||||
|
call <SID>X("FoldColumn", "", s:background, "")
|
||||||
|
if version >= 700
|
||||||
|
call <SID>X("CursorLine", "", s:line, "none")
|
||||||
|
call <SID>X("CursorColumn", "", s:line, "none")
|
||||||
|
call <SID>X("PMenu", s:foreground, s:selection, "none")
|
||||||
|
call <SID>X("PMenuSel", s:foreground, s:selection, "reverse")
|
||||||
|
end
|
||||||
|
if version >= 703
|
||||||
|
call <SID>X("ColorColumn", "", s:line, "none")
|
||||||
|
end
|
||||||
|
|
||||||
|
" Standard Highlighting
|
||||||
|
call <SID>X("Comment", s:comment, "", "")
|
||||||
|
call <SID>X("Todo", s:comment, s:background, "")
|
||||||
|
call <SID>X("Title", s:comment, "", "")
|
||||||
|
call <SID>X("Identifier", s:red, "", "none")
|
||||||
|
call <SID>X("Statement", s:foreground, "", "")
|
||||||
|
call <SID>X("Conditional", s:foreground, "", "")
|
||||||
|
call <SID>X("Repeat", s:foreground, "", "")
|
||||||
|
call <SID>X("Structure", s:purple, "", "")
|
||||||
|
call <SID>X("Function", s:blue, "", "")
|
||||||
|
call <SID>X("Constant", s:orange, "", "")
|
||||||
|
call <SID>X("String", s:green, "", "")
|
||||||
|
call <SID>X("Special", s:foreground, "", "")
|
||||||
|
call <SID>X("PreProc", s:purple, "", "")
|
||||||
|
call <SID>X("Operator", s:aqua, "", "none")
|
||||||
|
call <SID>X("Type", s:blue, "", "none")
|
||||||
|
call <SID>X("Define", s:purple, "", "none")
|
||||||
|
call <SID>X("Include", s:blue, "", "")
|
||||||
|
"call <SID>X("Ignore", "666666", "", "")
|
||||||
|
|
||||||
|
" Vim Highlighting
|
||||||
|
call <SID>X("vimCommand", s:red, "", "none")
|
||||||
|
|
||||||
|
" C Highlighting
|
||||||
|
call <SID>X("cType", s:yellow, "", "")
|
||||||
|
call <SID>X("cStorageClass", s:purple, "", "")
|
||||||
|
call <SID>X("cConditional", s:purple, "", "")
|
||||||
|
call <SID>X("cRepeat", s:purple, "", "")
|
||||||
|
|
||||||
|
" PHP Highlighting
|
||||||
|
call <SID>X("phpVarSelector", s:red, "", "")
|
||||||
|
call <SID>X("phpKeyword", s:purple, "", "")
|
||||||
|
call <SID>X("phpRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("phpConditional", s:purple, "", "")
|
||||||
|
call <SID>X("phpStatement", s:purple, "", "")
|
||||||
|
call <SID>X("phpMemberSelector", s:foreground, "", "")
|
||||||
|
|
||||||
|
" Ruby Highlighting
|
||||||
|
call <SID>X("rubySymbol", s:green, "", "")
|
||||||
|
call <SID>X("rubyConstant", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAccess", s:yellow, "", "")
|
||||||
|
call <SID>X("rubyAttribute", s:blue, "", "")
|
||||||
|
call <SID>X("rubyInclude", s:blue, "", "")
|
||||||
|
call <SID>X("rubyLocalVariableOrMethod", s:orange, "", "")
|
||||||
|
call <SID>X("rubyCurlyBlock", s:orange, "", "")
|
||||||
|
call <SID>X("rubyStringDelimiter", s:green, "", "")
|
||||||
|
call <SID>X("rubyInterpolationDelimiter", s:orange, "", "")
|
||||||
|
call <SID>X("rubyConditional", s:purple, "", "")
|
||||||
|
call <SID>X("rubyRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("rubyControl", s:purple, "", "")
|
||||||
|
call <SID>X("rubyException", s:purple, "", "")
|
||||||
|
|
||||||
|
" Python Highlighting
|
||||||
|
call <SID>X("pythonInclude", s:purple, "", "")
|
||||||
|
call <SID>X("pythonStatement", s:purple, "", "")
|
||||||
|
call <SID>X("pythonConditional", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("pythonException", s:purple, "", "")
|
||||||
|
call <SID>X("pythonFunction", s:blue, "", "")
|
||||||
|
call <SID>X("pythonPreCondit", s:purple, "", "")
|
||||||
|
call <SID>X("pythonRepeat", s:aqua, "", "")
|
||||||
|
call <SID>X("pythonExClass", s:orange, "", "")
|
||||||
|
|
||||||
|
" JavaScript Highlighting
|
||||||
|
call <SID>X("javaScriptBraces", s:foreground, "", "")
|
||||||
|
call <SID>X("javaScriptFunction", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptConditional", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("javaScriptNumber", s:orange, "", "")
|
||||||
|
call <SID>X("javaScriptMember", s:orange, "", "")
|
||||||
|
|
||||||
|
" HTML Highlighting
|
||||||
|
call <SID>X("htmlTag", s:red, "", "")
|
||||||
|
call <SID>X("htmlTagName", s:red, "", "")
|
||||||
|
call <SID>X("htmlArg", s:red, "", "")
|
||||||
|
call <SID>X("htmlScriptTag", s:red, "", "")
|
||||||
|
|
||||||
|
" Diff Highlighting
|
||||||
|
call <SID>X("diffAdded", s:green, "", "")
|
||||||
|
call <SID>X("diffRemoved", s:red, "", "")
|
||||||
|
|
||||||
|
" Lua Highlighting
|
||||||
|
call <SID>X("luaStatement", s:purple, "", "")
|
||||||
|
call <SID>X("luaRepeat", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondStart", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondElseif", s:purple, "", "")
|
||||||
|
call <SID>X("luaCond", s:purple, "", "")
|
||||||
|
call <SID>X("luaCondEnd", s:purple, "", "")
|
||||||
|
|
||||||
|
" Cucumber Highlighting
|
||||||
|
call <SID>X("cucumberGiven", s:blue, "", "")
|
||||||
|
call <SID>X("cucumberGivenAnd", s:blue, "", "")
|
||||||
|
|
||||||
|
" Go Highlighting
|
||||||
|
call <SID>X("goDirective", s:purple, "", "")
|
||||||
|
call <SID>X("goDeclaration", s:purple, "", "")
|
||||||
|
call <SID>X("goStatement", s:purple, "", "")
|
||||||
|
call <SID>X("goConditional", s:purple, "", "")
|
||||||
|
call <SID>X("goConstants", s:orange, "", "")
|
||||||
|
call <SID>X("goTodo", s:yellow, "", "")
|
||||||
|
call <SID>X("goDeclType", s:blue, "", "")
|
||||||
|
call <SID>X("goBuiltins", s:purple, "", "")
|
||||||
|
|
||||||
|
" Delete Functions
|
||||||
|
delf <SID>X
|
||||||
|
delf <SID>rgb
|
||||||
|
delf <SID>colour
|
||||||
|
delf <SID>rgb_colour
|
||||||
|
delf <SID>rgb_level
|
||||||
|
delf <SID>rgb_number
|
||||||
|
delf <SID>grey_colour
|
||||||
|
delf <SID>grey_level
|
||||||
|
delf <SID>grey_number
|
||||||
|
endif
|
108
vim/colors/codeschool.vim
Normal file
108
vim/colors/codeschool.vim
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
" Vim color file
|
||||||
|
" Converted from my Textmate Code School theme using Coloration
|
||||||
|
" http://astonj.com
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
highlight clear
|
||||||
|
|
||||||
|
if exists("syntax_on")
|
||||||
|
syntax reset
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:colors_name = "Code School 3"
|
||||||
|
|
||||||
|
hi Cursor ctermfg=16 ctermbg=145 cterm=NONE guifg=#182227 guibg=#9ea7a6 gui=NONE
|
||||||
|
hi Visual ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#3f4b52 gui=NONE
|
||||||
|
hi CursorLine ctermfg=NONE ctermbg=23 cterm=NONE guifg=NONE guibg=#2e373b gui=NONE
|
||||||
|
hi CursorColumn ctermfg=NONE ctermbg=23 cterm=NONE guifg=NONE guibg=#2e373b gui=NONE
|
||||||
|
hi ColorColumn ctermfg=NONE ctermbg=23 cterm=NONE guifg=NONE guibg=#2e373b gui=NONE
|
||||||
|
hi LineNr ctermfg=102 ctermbg=23 cterm=NONE guifg=#84898c guibg=#2a343a gui=NONE
|
||||||
|
hi VertSplit ctermfg=59 ctermbg=59 cterm=NONE guifg=#252c31 guibg=#252c31 gui=NONE
|
||||||
|
hi MatchParen ctermfg=180 ctermbg=NONE cterm=underline guifg=#dda790 guibg=NONE gui=underline
|
||||||
|
hi StatusLine ctermfg=231 ctermbg=59 cterm=bold guifg=#f0f0f0 guibg=#575e61 gui=bold
|
||||||
|
hi StatusLineNC ctermfg=231 ctermbg=59 cterm=NONE guifg=#f0f0f0 guibg=#575e61 gui=NONE
|
||||||
|
hi Pmenu ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi PmenuSel ctermfg=NONE ctermbg=59 cterm=NONE guifg=NONE guibg=#3f4b52 gui=NONE
|
||||||
|
hi IncSearch ctermfg=16 ctermbg=107 cterm=NONE guifg=#182227 guibg=#8bb664 gui=NONE
|
||||||
|
hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline
|
||||||
|
hi Directory ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Folded ctermfg=247 ctermbg=16 cterm=NONE guifg=#9a9a9a guibg=#182227 gui=NONE
|
||||||
|
|
||||||
|
hi Normal ctermfg=231 ctermbg=16 cterm=NONE guifg=#f0f0f0 guibg=#252c31 gui=NONE
|
||||||
|
hi Boolean ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Character ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Comment ctermfg=247 ctermbg=NONE cterm=NONE guifg=#9a9a9a guibg=NONE gui=italic
|
||||||
|
hi Conditional ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi Constant ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Define ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f0f0f0 guibg=#43820d gui=bold
|
||||||
|
hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#880708 guibg=NONE gui=NONE
|
||||||
|
hi DiffChange ctermfg=231 ctermbg=23 cterm=NONE guifg=#f0f0f0 guibg=#1c3657 gui=NONE
|
||||||
|
hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f0f0f0 guibg=#204a87 gui=bold
|
||||||
|
hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi Float ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Function ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi Identifier ctermfg=113 ctermbg=NONE cterm=NONE guifg=#99cf50 guibg=NONE gui=NONE
|
||||||
|
hi Keyword ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi Label ctermfg=107 ctermbg=NONE cterm=NONE guifg=#8bb664 guibg=NONE gui=NONE
|
||||||
|
hi NonText ctermfg=59 ctermbg=17 cterm=NONE guifg=#414e58 guibg=#232c31 gui=NONE
|
||||||
|
hi Number ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi Operator ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi PreProc ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f0f0f0 guibg=NONE gui=NONE
|
||||||
|
hi SpecialKey ctermfg=59 ctermbg=23 cterm=NONE guifg=#414e58 guibg=#252c31 gui=NONE
|
||||||
|
hi Statement ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi StorageClass ctermfg=113 ctermbg=NONE cterm=NONE guifg=#99cf50 guibg=NONE gui=NONE
|
||||||
|
hi String ctermfg=107 ctermbg=NONE cterm=NONE guifg=#8bb664 guibg=NONE gui=NONE
|
||||||
|
hi Tag ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f0f0f0 guibg=NONE gui=bold
|
||||||
|
hi Todo ctermfg=247 ctermbg=NONE cterm=inverse,bold guifg=#9a9a9a guibg=NONE gui=inverse,bold,italic
|
||||||
|
hi Type ctermfg=153 ctermbg=NONE cterm=NONE guifg=#b5d8f6 guibg=NONE gui=NONE
|
||||||
|
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline
|
||||||
|
hi rubyClass ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi rubyFunction ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi rubySymbol ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi rubyConstant ctermfg=146 ctermbg=NONE cterm=NONE guifg=#bfabcb guibg=NONE gui=NONE
|
||||||
|
hi rubyStringDelimiter ctermfg=107 ctermbg=NONE cterm=NONE guifg=#8bb664 guibg=NONE gui=NONE
|
||||||
|
hi rubyBlockParameter ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi rubyInstanceVariable ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi rubyInclude ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi rubyGlobalVariable ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi rubyRegexp ctermfg=179 ctermbg=NONE cterm=NONE guifg=#e9c062 guibg=NONE gui=NONE
|
||||||
|
hi rubyRegexpDelimiter ctermfg=179 ctermbg=NONE cterm=NONE guifg=#e9c062 guibg=NONE gui=NONE
|
||||||
|
hi rubyEscape ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi rubyControl ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi rubyClassVariable ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi rubyOperator ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi rubyException ctermfg=180 ctermbg=NONE cterm=NONE guifg=#dda790 guibg=NONE gui=NONE
|
||||||
|
hi rubyPseudoVariable ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsUserClass ctermfg=146 ctermbg=NONE cterm=NONE guifg=#bfabcb guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsARAssociationMethod ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsARMethod ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsRenderMethod ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi rubyRailsMethod ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi erubyComment ctermfg=247 ctermbg=NONE cterm=NONE guifg=#9a9a9a guibg=NONE gui=italic
|
||||||
|
hi erubyRailsMethod ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi htmlTag ctermfg=111 ctermbg=NONE cterm=NONE guifg=#89bdff guibg=NONE gui=NONE
|
||||||
|
hi htmlEndTag ctermfg=111 ctermbg=NONE cterm=NONE guifg=#89bdff guibg=NONE gui=NONE
|
||||||
|
hi htmlTagName ctermfg=111 ctermbg=NONE cterm=NONE guifg=#89bdff guibg=NONE gui=NONE
|
||||||
|
hi htmlArg ctermfg=111 ctermbg=NONE cterm=NONE guifg=#89bdff guibg=NONE gui=NONE
|
||||||
|
hi htmlSpecialChar ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi javaScriptFunction ctermfg=113 ctermbg=NONE cterm=NONE guifg=#99cf50 guibg=NONE gui=NONE
|
||||||
|
hi javaScriptRailsFunction ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
||||||
|
hi yamlKey ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi yamlAnchor ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi yamlAlias ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi yamlDocumentHeader ctermfg=107 ctermbg=NONE cterm=NONE guifg=#8bb664 guibg=NONE gui=NONE
|
||||||
|
hi cssURL ctermfg=74 ctermbg=NONE cterm=NONE guifg=#68a9eb guibg=NONE gui=NONE
|
||||||
|
hi cssFunctionName ctermfg=186 ctermbg=NONE cterm=NONE guifg=#dad085 guibg=NONE gui=NONE
|
||||||
|
hi cssColor ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi cssPseudoClassId ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi cssClassName ctermfg=153 ctermbg=NONE cterm=NONE guifg=#bcdbff guibg=NONE gui=NONE
|
||||||
|
hi cssValueLength ctermfg=68 ctermbg=NONE cterm=NONE guifg=#3c98d9 guibg=NONE gui=NONE
|
||||||
|
hi cssCommonAttr ctermfg=151 ctermbg=NONE cterm=NONE guifg=#a7cfa3 guibg=NONE gui=NONE
|
||||||
|
hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE
|
65
vim/colors/pychimp.vim
Normal file
65
vim/colors/pychimp.vim
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
" Vim colorscheme -- PyChimp
|
||||||
|
"
|
||||||
|
" Crated specifically for Python coding ! (For other languages, I do suggest that
|
||||||
|
" you find other colorschemes, there are loads !)
|
||||||
|
"
|
||||||
|
" Author: Pratheek <pratheek.i@gmail.com>
|
||||||
|
"
|
||||||
|
" Note: This theme uses ideas from Python IDLE, (and has some similarities) from Molokai theme
|
||||||
|
" created by Thomas Restrepo
|
||||||
|
" <http://www.vim.org/scripts/script.php?script_id=2340>
|
||||||
|
"
|
||||||
|
" This colorscheme is specifically created, to work in a translucent
|
||||||
|
" background provided by terminal and supports 256 color terminals
|
||||||
|
"
|
||||||
|
" Tip -- add <t_Co=256> in your ~/.vimrc to utilize the theme well.
|
||||||
|
"
|
||||||
|
" Thats it ! Hope you like it ! :)
|
||||||
|
|
||||||
|
let g:colors_name = "pychimp"
|
||||||
|
|
||||||
|
" The Basic (Normal) Text Style
|
||||||
|
|
||||||
|
hi Normal ctermfg=253 ctermbg=NONE cterm=NONE
|
||||||
|
|
||||||
|
" All the Python related stuff
|
||||||
|
|
||||||
|
hi Number ctermfg=141 ctermbg=NONE cterm=NONE
|
||||||
|
hi Float ctermfg=141 ctermbg=NONE cterm=NONE
|
||||||
|
hi Statement ctermfg=208 ctermbg=NONE cterm=bold
|
||||||
|
hi Function ctermfg=35 ctermbg=NONE cterm=NONE
|
||||||
|
hi Conditional ctermfg=136 ctermbg=NONE cterm=NONE
|
||||||
|
hi Operator ctermfg=208 ctermbg=NONE cterm=NONE
|
||||||
|
hi Todo ctermfg=253 ctermbg=NONE cterm=bold
|
||||||
|
hi Comment ctermfg=240 ctermbg=NONE cterm=NONE
|
||||||
|
hi Special ctermfg=81 ctermbg=NONE cterm=NONE
|
||||||
|
hi String ctermfg=169 ctermbg=NONE cterm=NONE
|
||||||
|
hi Include ctermfg=118 ctermbg=NONE cterm=bold
|
||||||
|
hi Constant ctermfg=178 ctermbg=NONE cterm=bold
|
||||||
|
hi Error ctermfg=88 ctermbg=172 cterm=bold
|
||||||
|
hi PreProc ctermfg=81 ctermbg=NONE cterm=NONE
|
||||||
|
hi Boolean ctermfg=38 ctermbg=NONE cterm=bold
|
||||||
|
hi Character ctermfg=142 ctermbg=NONE cterm=NONE
|
||||||
|
|
||||||
|
"Vim Stuff
|
||||||
|
|
||||||
|
hi Visual ctermfg=253 ctermbg=235 cterm=NONE
|
||||||
|
hi VertSplit ctermfg=232 ctermbg=244 cterm=NONE
|
||||||
|
hi ErrorMsg ctermfg=88 ctermbg=172 cterm=bold
|
||||||
|
hi MatchParen ctermfg=16 ctermbg=215 cterm=bold
|
||||||
|
hi Folded ctermfg=67 ctermbg=16 cterm=bold
|
||||||
|
hi FoldColumn ctermfg=67 ctermbg=16 cterm=NONE
|
||||||
|
hi LineNr ctermfg=58 ctermbg=NONE cterm=NONE
|
||||||
|
hi NonText ctermfg=58 ctermbg=NONE cterm=NONE
|
||||||
|
hi Pmenu ctermfg=81 ctermbg=16 cterm=NONE
|
||||||
|
hi PmenuSel ctermfg=202 ctermbg=16 cterm=NONE
|
||||||
|
hi PmenuSbar ctermfg=81 ctermbg=16 cterm=NONE
|
||||||
|
hi PmenuThumb ctermfg=81 ctermbg=16 cterm=NONE
|
||||||
|
hi Search ctermfg=253 ctermbg=66 cterm=NONE
|
||||||
|
hi IncSearch ctermfg=253 ctermbg=66 cterm=NONE
|
||||||
|
hi TabLine ctermfg=3 ctermbg=NONE cterm=NONE
|
||||||
|
hi TabLineSel ctermfg=14 ctermbg=NONE cterm=bold
|
||||||
|
hi TabLineFill ctermfg=46 ctermbg=NONE cterm=NONE
|
||||||
|
|
||||||
|
" End of Colour scheme ! (Pretty small !:) )
|
||||||
|
" Will add support for more languages eventually. !
|
@ -16,5 +16,10 @@ let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*'
|
|||||||
let g:LatexBox_output_type="pdf"
|
let g:LatexBox_output_type="pdf"
|
||||||
let g:LatexBox_viewer="evince"
|
let g:LatexBox_viewer="evince"
|
||||||
|
|
||||||
|
|
||||||
let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections'
|
let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections'
|
||||||
|
|
||||||
|
if !exists("g:tex_comment_nospell") || !g:tex_comment_nospell
|
||||||
|
syn cluster texCommentGroup contains=texTodo,@Spell
|
||||||
|
else
|
||||||
|
syn cluster texCommentGroup contains=texTodo,@NoSpell
|
||||||
|
endif
|
||||||
|
246
vim/syntax/javascript.vim
Normal file
246
vim/syntax/javascript.vim
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: JavaScript
|
||||||
|
" Maintainer: Yi Zhao (ZHAOYI) <zzlinux AT hotmail DOT com>
|
||||||
|
" Last Change: June 4, 2009
|
||||||
|
" Version: 0.7.7
|
||||||
|
" Changes: Add "undefined" as a type keyword
|
||||||
|
"
|
||||||
|
" TODO:
|
||||||
|
" - Add the HTML syntax inside the JSDoc
|
||||||
|
|
||||||
|
if !exists("main_syntax")
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let main_syntax = 'javascript'
|
||||||
|
endif
|
||||||
|
|
||||||
|
"" Drop fold if it set but VIM doesn't support it.
|
||||||
|
let b:javascript_fold='true'
|
||||||
|
if version < 600 " Don't support the old version
|
||||||
|
unlet! b:javascript_fold
|
||||||
|
endif
|
||||||
|
|
||||||
|
"" dollar sigh is permittd anywhere in an identifier
|
||||||
|
setlocal iskeyword+=$
|
||||||
|
|
||||||
|
syntax sync fromstart
|
||||||
|
|
||||||
|
"" JavaScript comments
|
||||||
|
syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
|
||||||
|
syntax region javaScriptLineComment start=+\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell
|
||||||
|
syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend contains=javaScriptCommentTodo,@Spell fold
|
||||||
|
syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained
|
||||||
|
syntax region javaScriptComment start="/\*" end="\*/" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold
|
||||||
|
|
||||||
|
"" JSDoc support start
|
||||||
|
if !exists("javascript_ignore_javaScriptdoc")
|
||||||
|
syntax case ignore
|
||||||
|
|
||||||
|
"" syntax coloring for javadoc comments (HTML)
|
||||||
|
"syntax include @javaHtml <sfile>:p:h/html.vim
|
||||||
|
"unlet b:current_syntax
|
||||||
|
|
||||||
|
syntax region javaScriptDocComment matchgroup=javaScriptComment start="/\*\*\s*$" end="\*/" contains=javaScriptDocTags,javaScriptCommentTodo,javaScriptCvsTag,@javaScriptHtml,@Spell fold
|
||||||
|
syntax match javaScriptDocTags contained "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\)\>" nextgroup=javaScriptDocParam,javaScriptDocSeeTag skipwhite
|
||||||
|
syntax match javaScriptDocTags contained "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|returns\=\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>"
|
||||||
|
syntax match javaScriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+"
|
||||||
|
syntax region javaScriptDocSeeTag contained matchgroup=javaScriptDocSeeTag start="{" end="}" contains=javaScriptDocTags
|
||||||
|
|
||||||
|
syntax case match
|
||||||
|
endif "" JSDoc end
|
||||||
|
|
||||||
|
syntax case match
|
||||||
|
|
||||||
|
"" Syntax in the JavaScript code
|
||||||
|
syntax match javaScriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\."
|
||||||
|
syntax region javaScriptStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=javaScriptSpecial,@htmlPreproc
|
||||||
|
syntax region javaScriptStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=javaScriptSpecial,@htmlPreproc
|
||||||
|
syntax region javaScriptRegexpString start=+/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gim]\{,3}+ contains=javaScriptSpecial,@htmlPreproc oneline
|
||||||
|
syntax match javaScriptNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/
|
||||||
|
syntax match javaScriptFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
|
||||||
|
syntax match javaScriptLabel /\(?\s*\)\@<!\<\w\+\(\s*:\)\@=/
|
||||||
|
|
||||||
|
"" JavaScript Prototype
|
||||||
|
syntax keyword javaScriptPrototype prototype
|
||||||
|
|
||||||
|
"" Programm Keywords
|
||||||
|
syntax keyword javaScriptSource import export
|
||||||
|
syntax keyword javaScriptType const this undefined var void yield
|
||||||
|
syntax keyword javaScriptOperator delete new in instanceof let typeof
|
||||||
|
syntax keyword javaScriptBoolean true false
|
||||||
|
syntax keyword javaScriptNull null
|
||||||
|
|
||||||
|
"" Statement Keywords
|
||||||
|
syntax keyword javaScriptConditional if else
|
||||||
|
syntax keyword javaScriptRepeat do while for
|
||||||
|
syntax keyword javaScriptBranch break continue switch case default return
|
||||||
|
syntax keyword javaScriptStatement try catch throw with finally
|
||||||
|
|
||||||
|
syntax keyword javaScriptGlobalObjects Array Boolean Date Function Infinity JavaArray JavaClass JavaObject JavaPackage Math Number NaN Object Packages RegExp String Undefined java netscape sun
|
||||||
|
|
||||||
|
syntax keyword javaScriptExceptions Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
|
||||||
|
|
||||||
|
syntax keyword javaScriptFutureKeys abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public
|
||||||
|
|
||||||
|
"" DOM/HTML/CSS specified things
|
||||||
|
|
||||||
|
" DOM2 Objects
|
||||||
|
syntax keyword javaScriptGlobalObjects DOMImplementation DocumentFragment Document Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction
|
||||||
|
syntax keyword javaScriptExceptions DOMException
|
||||||
|
|
||||||
|
" DOM2 CONSTANT
|
||||||
|
syntax keyword javaScriptDomErrNo INDEX_SIZE_ERR DOMSTRING_SIZE_ERR HIERARCHY_REQUEST_ERR WRONG_DOCUMENT_ERR INVALID_CHARACTER_ERR NO_DATA_ALLOWED_ERR NO_MODIFICATION_ALLOWED_ERR NOT_FOUND_ERR NOT_SUPPORTED_ERR INUSE_ATTRIBUTE_ERR INVALID_STATE_ERR SYNTAX_ERR INVALID_MODIFICATION_ERR NAMESPACE_ERR INVALID_ACCESS_ERR
|
||||||
|
syntax keyword javaScriptDomNodeConsts ELEMENT_NODE ATTRIBUTE_NODE TEXT_NODE CDATA_SECTION_NODE ENTITY_REFERENCE_NODE ENTITY_NODE PROCESSING_INSTRUCTION_NODE COMMENT_NODE DOCUMENT_NODE DOCUMENT_TYPE_NODE DOCUMENT_FRAGMENT_NODE NOTATION_NODE
|
||||||
|
|
||||||
|
" HTML events and internal variables
|
||||||
|
syntax case ignore
|
||||||
|
syntax keyword javaScriptHtmlEvents onblur onclick oncontextmenu ondblclick onfocus onkeydown onkeypress onkeyup onmousedown onmousemove onmouseout onmouseover onmouseup onresize
|
||||||
|
syntax case match
|
||||||
|
|
||||||
|
" Follow stuff should be highligh within a special context
|
||||||
|
" While it can't be handled with context depended with Regex based highlight
|
||||||
|
" So, turn it off by default
|
||||||
|
if exists("javascript_enable_domhtmlcss")
|
||||||
|
|
||||||
|
" DOM2 things
|
||||||
|
syntax match javaScriptDomElemAttrs contained /\%(nodeName\|nodeValue\|nodeType\|parentNode\|childNodes\|firstChild\|lastChild\|previousSibling\|nextSibling\|attributes\|ownerDocument\|namespaceURI\|prefix\|localName\|tagName\)\>/
|
||||||
|
syntax match javaScriptDomElemFuncs contained /\%(insertBefore\|replaceChild\|removeChild\|appendChild\|hasChildNodes\|cloneNode\|normalize\|isSupported\|hasAttributes\|getAttribute\|setAttribute\|removeAttribute\|getAttributeNode\|setAttributeNode\|removeAttributeNode\|getElementsByTagName\|getAttributeNS\|setAttributeNS\|removeAttributeNS\|getAttributeNodeNS\|setAttributeNodeNS\|getElementsByTagNameNS\|hasAttribute\|hasAttributeNS\)\>/ nextgroup=javaScriptParen skipwhite
|
||||||
|
" HTML things
|
||||||
|
syntax match javaScriptHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/
|
||||||
|
syntax match javaScriptHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=javaScriptParen skipwhite
|
||||||
|
|
||||||
|
" CSS Styles in JavaScript
|
||||||
|
syntax keyword javaScriptCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition
|
||||||
|
syntax keyword javaScriptCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition
|
||||||
|
syntax keyword javaScriptCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode
|
||||||
|
syntax keyword javaScriptCssStyles contained bottom height left position right top width zIndex
|
||||||
|
syntax keyword javaScriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout
|
||||||
|
syntax keyword javaScriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop
|
||||||
|
syntax keyword javaScriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType
|
||||||
|
syntax keyword javaScriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat
|
||||||
|
syntax keyword javaScriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType
|
||||||
|
syntax keyword javaScriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
|
||||||
|
syntax keyword javaScriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
|
||||||
|
|
||||||
|
" Highlight ways
|
||||||
|
syntax match javaScriptDotNotation "\." nextgroup=javaScriptPrototype,javaScriptDomElemAttrs,javaScriptDomElemFuncs,javaScriptHtmlElemAttrs,javaScriptHtmlElemFuncs
|
||||||
|
syntax match javaScriptDotNotation "\.style\." nextgroup=javaScriptCssStyles
|
||||||
|
|
||||||
|
endif "DOM/HTML/CSS
|
||||||
|
|
||||||
|
"" end DOM/HTML/CSS specified things
|
||||||
|
|
||||||
|
|
||||||
|
"" Code blocks
|
||||||
|
syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation
|
||||||
|
syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc
|
||||||
|
syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
||||||
|
syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
||||||
|
|
||||||
|
"" catch errors caused by wrong parenthesis
|
||||||
|
syntax match javaScriptParensError ")\|}\|\]"
|
||||||
|
syntax match javaScriptParensErrA contained "\]"
|
||||||
|
syntax match javaScriptParensErrB contained ")"
|
||||||
|
syntax match javaScriptParensErrC contained "}"
|
||||||
|
|
||||||
|
if main_syntax == "javascript"
|
||||||
|
syntax sync clear
|
||||||
|
syntax sync ccomment javaScriptComment minlines=200
|
||||||
|
syntax sync match javaScriptHighlight grouphere javaScriptBlock /{/
|
||||||
|
endif
|
||||||
|
|
||||||
|
"" Fold control
|
||||||
|
if exists("b:javascript_fold")
|
||||||
|
syntax match javaScriptFunction /\<function\>/ nextgroup=javaScriptFuncName skipwhite
|
||||||
|
syntax match javaScriptOpAssign /=\@<!=/ nextgroup=javaScriptFuncBlock skipwhite skipempty
|
||||||
|
syntax region javaScriptFuncName contained matchgroup=javaScriptFuncName start=/\%(\$\|\w\)*\s*(/ end=/)/ contains=javaScriptLineComment,javaScriptComment nextgroup=javaScriptFuncBlock skipwhite skipempty
|
||||||
|
syntax region javaScriptFuncBlock contained matchgroup=javaScriptFuncBlock start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock fold
|
||||||
|
|
||||||
|
if &l:filetype=='javascript' && !&diff
|
||||||
|
" Fold setting
|
||||||
|
" Redefine the foldtext (to show a JS function outline) and foldlevel
|
||||||
|
" only if the entire buffer is JavaScript, but not if JavaScript syntax
|
||||||
|
" is embedded in another syntax (e.g. HTML).
|
||||||
|
setlocal foldmethod=syntax
|
||||||
|
setlocal foldlevel=4
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
syntax keyword javaScriptFunction function
|
||||||
|
setlocal foldmethod<
|
||||||
|
setlocal foldlevel<
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Define the default highlighting.
|
||||||
|
" For version 5.7 and earlier: only when not done already
|
||||||
|
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||||
|
if version >= 508 || !exists("did_javascript_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_javascript_syn_inits = 1
|
||||||
|
command -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
HiLink javaScriptComment Comment
|
||||||
|
HiLink javaScriptLineComment Comment
|
||||||
|
HiLink javaScriptDocComment Comment
|
||||||
|
HiLink javaScriptCommentTodo Todo
|
||||||
|
HiLink javaScriptCvsTag Function
|
||||||
|
HiLink javaScriptDocTags Special
|
||||||
|
HiLink javaScriptDocSeeTag Function
|
||||||
|
HiLink javaScriptDocParam Function
|
||||||
|
HiLink javaScriptStringS String
|
||||||
|
HiLink javaScriptStringD String
|
||||||
|
HiLink javaScriptRegexpString String
|
||||||
|
HiLink javaScriptCharacter Character
|
||||||
|
HiLink javaScriptPrototype Type
|
||||||
|
HiLink javaScriptConditional Conditional
|
||||||
|
HiLink javaScriptBranch Conditional
|
||||||
|
HiLink javaScriptRepeat Repeat
|
||||||
|
HiLink javaScriptStatement Statement
|
||||||
|
HiLink javaScriptFunction Function
|
||||||
|
HiLink javaScriptError Error
|
||||||
|
HiLink javaScriptParensError Error
|
||||||
|
HiLink javaScriptParensErrA Error
|
||||||
|
HiLink javaScriptParensErrB Error
|
||||||
|
HiLink javaScriptParensErrC Error
|
||||||
|
HiLink javaScriptOperator Operator
|
||||||
|
HiLink javaScriptType Type
|
||||||
|
HiLink javaScriptNull Type
|
||||||
|
HiLink javaScriptNumber Number
|
||||||
|
HiLink javaScriptFloat Number
|
||||||
|
HiLink javaScriptBoolean Boolean
|
||||||
|
HiLink javaScriptLabel Label
|
||||||
|
HiLink javaScriptSpecial Special
|
||||||
|
HiLink javaScriptSource Special
|
||||||
|
HiLink javaScriptGlobalObjects Special
|
||||||
|
HiLink javaScriptExceptions Special
|
||||||
|
|
||||||
|
HiLink javaScriptDomErrNo Constant
|
||||||
|
HiLink javaScriptDomNodeConsts Constant
|
||||||
|
HiLink javaScriptDomElemAttrs Label
|
||||||
|
HiLink javaScriptDomElemFuncs PreProc
|
||||||
|
|
||||||
|
HiLink javaScriptHtmlEvents Special
|
||||||
|
HiLink javaScriptHtmlElemAttrs Label
|
||||||
|
HiLink javaScriptHtmlElemFuncs PreProc
|
||||||
|
|
||||||
|
HiLink javaScriptCssStyles Label
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Define the htmlJavaScript for HTML syntax html.vim
|
||||||
|
"syntax clear htmlJavaScript
|
||||||
|
"syntax clear javaScriptExpression
|
||||||
|
syntax cluster htmlJavaScript contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError
|
||||||
|
syntax cluster javaScriptExpression contains=@javaScriptAll,javaScriptBracket,javaScriptParen,javaScriptBlock,javaScriptParenError,@htmlPreproc
|
||||||
|
|
||||||
|
let b:current_syntax = "javascript"
|
||||||
|
if main_syntax == 'javascript'
|
||||||
|
unlet main_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
" vim: ts=4
|
30
vimrc
30
vimrc
@ -10,8 +10,9 @@ call vundle#rc()
|
|||||||
" required!
|
" required!
|
||||||
Bundle "gmarik/vundle"
|
Bundle "gmarik/vundle"
|
||||||
Bundle "LaTeX-Box-Team/LaTeX-Box"
|
Bundle "LaTeX-Box-Team/LaTeX-Box"
|
||||||
Bundle "tpope/vim-fugitive"
|
Bundle "tpope/vim-repeat"
|
||||||
Bundle "tpope/vim-unimpaired"
|
Bundle "tpope/vim-unimpaired"
|
||||||
|
Bundle "tpope/vim-fugitive"
|
||||||
Bundle "scrooloose/nerdtree"
|
Bundle "scrooloose/nerdtree"
|
||||||
Bundle "scrooloose/nerdcommenter"
|
Bundle "scrooloose/nerdcommenter"
|
||||||
Bundle "scrooloose/syntastic"
|
Bundle "scrooloose/syntastic"
|
||||||
@ -26,6 +27,8 @@ Bundle "mattn/gist-vim"
|
|||||||
Bundle "mattn/webapi-vim"
|
Bundle "mattn/webapi-vim"
|
||||||
Bundle "kien/ctrlp.vim.git"
|
Bundle "kien/ctrlp.vim.git"
|
||||||
Bundle "klen/python-mode"
|
Bundle "klen/python-mode"
|
||||||
|
Bundle "flazz/vim-colorschemes"
|
||||||
|
Bundle "Lokaltog/vim-distinguished"
|
||||||
|
|
||||||
filetype plugin indent on " required!
|
filetype plugin indent on " required!
|
||||||
|
|
||||||
@ -40,6 +43,7 @@ autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,
|
|||||||
au FileType py set textwidth=79
|
au FileType py set textwidth=79
|
||||||
autocmd Filetype javascript set ts=4 sts=4 sw=4 expandtab smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
|
autocmd Filetype javascript set ts=4 sts=4 sw=4 expandtab smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
|
||||||
set expandtab
|
set expandtab
|
||||||
|
set smarttab
|
||||||
set autoindent
|
set autoindent
|
||||||
set smartindent
|
set smartindent
|
||||||
syntax on
|
syntax on
|
||||||
@ -54,6 +58,9 @@ set showmatch
|
|||||||
set incsearch
|
set incsearch
|
||||||
set hlsearch
|
set hlsearch
|
||||||
|
|
||||||
|
set ruler
|
||||||
|
set wildmenu
|
||||||
|
set autoread
|
||||||
"Better Map Leader
|
"Better Map Leader
|
||||||
let mapleader=","
|
let mapleader=","
|
||||||
noremap \ ,
|
noremap \ ,
|
||||||
@ -75,7 +82,7 @@ imap <C-S> <C-O>:w<CR>
|
|||||||
"Custom maps
|
"Custom maps
|
||||||
noremap <Leader>n :NERDTreeToggle<CR>
|
noremap <Leader>n :NERDTreeToggle<CR>
|
||||||
noremap <Leader>t :TagbarToggle<CR>
|
noremap <Leader>t :TagbarToggle<CR>
|
||||||
noremap <Leader>f :CtrlPMixed<CR>
|
noremap <Leader>f :CtrlPBuffer<CR>
|
||||||
"Omni
|
"Omni
|
||||||
|
|
||||||
set completeopt=longest,menuone
|
set completeopt=longest,menuone
|
||||||
@ -112,12 +119,12 @@ nmap SO :so ~/.vim/Session.vim<CR>
|
|||||||
|
|
||||||
"Make tabs and buffers work better
|
"Make tabs and buffers work better
|
||||||
:se switchbuf=usetab,newtab
|
:se switchbuf=usetab,newtab
|
||||||
":tab sball
|
|
||||||
|
|
||||||
" Color and shit
|
" Color and shit
|
||||||
colo vividchalk
|
set t_Co=256
|
||||||
set background=dark
|
set background=dark
|
||||||
hi SpellBad ctermbg=Red ctermfg=White
|
colo solarized
|
||||||
|
"hi SpellBad ctermfg=Red
|
||||||
|
|
||||||
"Statusline
|
"Statusline
|
||||||
|
|
||||||
@ -126,11 +133,11 @@ set laststatus=2
|
|||||||
|
|
||||||
function! InsertStatuslineColor(mode)
|
function! InsertStatuslineColor(mode)
|
||||||
if a:mode == 'i'
|
if a:mode == 'i'
|
||||||
hi statusline guibg=Red ctermfg=White guifg=White ctermbg=Red
|
hi statusline guibg=Red ctermbg=Red guifg=White ctermfg=White
|
||||||
elseif a:mode == 'r'
|
elseif a:mode == 'r'
|
||||||
hi statusline guibg=Blue ctermfg=White guifg=White ctermbg=Blue
|
hi statusline guibg=Blue ctermfg=White guifg=White ctermbg=Blue
|
||||||
else
|
else
|
||||||
hi statusline guibg=Yellow ctermfg=White guifg=Black ctermbg=Yellow
|
hi statusline ctermbg=Yellow guibg=Yellow ctermfg=Black guifg=Black
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -139,4 +146,13 @@ call InsertStatuslineColor('')
|
|||||||
au InsertEnter * call InsertStatuslineColor(v:insertmode)
|
au InsertEnter * call InsertStatuslineColor(v:insertmode)
|
||||||
au InsertLeave * call InsertStatuslineColor('')
|
au InsertLeave * call InsertStatuslineColor('')
|
||||||
|
|
||||||
|
"Diff the buffer and the original
|
||||||
|
command DiffOrig let g:diffline = line('.') | vert new | set bt=nofile | r # | 0d_ | diffthis | :exe "norm! ".g:diffline."G" | wincmd p | diffthis | wincmd p
|
||||||
|
nnoremap <Leader>do :DiffOrig<cr>
|
||||||
|
nnoremap <leader>dc :q<cr>:diffoff<cr>:exe "norm! ".g:diffline."G"<cr>
|
||||||
|
|
||||||
|
let g:ctrlp_cmd = 'CtrlPBuffer'
|
||||||
|
|
||||||
set guifont=DejaVu\ Sans\ Mono
|
set guifont=DejaVu\ Sans\ Mono
|
||||||
|
|
||||||
|
set foldmethod=syntax
|
||||||
|
Loading…
Reference in New Issue
Block a user