From f2a4c79208302aec6c45949ef69eaf9ad1bcd2f0 Mon Sep 17 00:00:00 2001 From: bowekr Date: Wed, 4 Nov 2015 17:39:47 +0700 Subject: [PATCH] adding vim and tmux --- .tmux.conf | 39 +++ .vim/.netrwhist | 3 + .vim/colors/distinguished.vim | 181 +++++++++++++ .vim/colors/getfresh.vim | 194 ++++++++++++++ .vim/colors/hybrid.vim | 430 +++++++++++++++++++++++++++++ .vim/colors/jellybeans.vim | 491 ++++++++++++++++++++++++++++++++++ .vim/colors/nucolors.vim | 162 +++++++++++ .vim/colors/predawn.vim | 107 ++++++++ .vim/colors/tropikos.vim | 123 +++++++++ .vimrc | 214 +++++++++++++++ 10 files changed, 1944 insertions(+) create mode 100644 .tmux.conf create mode 100644 .vim/.netrwhist create mode 100644 .vim/colors/distinguished.vim create mode 100644 .vim/colors/getfresh.vim create mode 100644 .vim/colors/hybrid.vim create mode 100644 .vim/colors/jellybeans.vim create mode 100644 .vim/colors/nucolors.vim create mode 100644 .vim/colors/predawn.vim create mode 100644 .vim/colors/tropikos.vim create mode 100644 .vimrc diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..b6cebd3 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,39 @@ +# Main +set -g prefix ^a +set -g status-keys vi +setw -g mode-keys vi +set -g default-terminal "rxvt-unicode-256color" + +# Window Panes +set -g base-index 1 +set -g pane-base-index 1 + +#------------------- +# STATUS +#------------------ +set -g message-attr bold +set -g message-fg black +set -g message-bg yellow + +set -g status-justify right +set -g status-bg black +set -g status-fg white +set -g status-interval 5 +set -g status-utf8 on + +setw -g window-status-fg magenta +setw -g window-status-attr none +setw -g window-status-current-fg white +setw -g window-status-current-bg black +setw -g window-status-current-attr bold + +setw -g window-status-activity-attr none + +setw -g window-status-format '#[fg=white,bg=blue] #I #[fg=black,bg=cyan] #W ' +setw -g window-status-current-format '#[fg=blue,bg=white] #I #[fg=black,bg=yellow] #W ' + +set -g status-left '#[fg=blue,bold] #S#[default,fg=white][#[fg=yellow]#I:#P#[fg=white]]#[fg=black,bold]@#[fg=red]#H #[fg=black,bold]» #T#[default]' +set -g status-left-length 80 +set -g status-left-fg black + +set -g status-right '' diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..82292ae --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =1 +let g:netrw_dirhist_1='/home/bowo/sporra' diff --git a/.vim/colors/distinguished.vim b/.vim/colors/distinguished.vim new file mode 100644 index 0000000..db3af12 --- /dev/null +++ b/.vim/colors/distinguished.vim @@ -0,0 +1,181 @@ +" Author: Kim Silkebækken +" Source repository: https://github.com/Lokaltog/vim-distinguished + +" Initialization {{{ + set background=dark + + hi clear + if exists('syntax_on') + syntax reset + endif + + let g:colors_name = 'distinguished' + + if ! has('gui_running') + if &t_Co != 256 + echoe 'The ' . g:colors_name . ' color scheme requires gvim or a 256-color terminal' + + finish + endif + endif +" }}} +" Color dictionary parser {{{ + function! s:ColorDictParser(color_dict) + for [group, group_colors] in items(a:color_dict) + exec 'hi ' . group + \ . ' ctermfg=' . (group_colors[0] == '' ? 'NONE' : group_colors[0]) + \ . ' ctermbg=' . (group_colors[1] == '' ? 'NONE' : group_colors[1]) + \ . ' cterm=' . (group_colors[2] == '' ? 'NONE' : group_colors[2]) + \ + \ . ' guifg=' . (group_colors[3] == '' ? 'NONE' : '#' . group_colors[3]) + \ . ' guibg=' . (group_colors[4] == '' ? 'NONE' : '#' . group_colors[4]) + \ . ' gui=' . (group_colors[5] == '' ? 'NONE' : group_colors[5]) + endfor + endfunction +" }}} + +" | Highlight group | CTFG | CTBG | CTAttributes | || | GUIFG | GUIBG | GUIAttributes | +" |--------------------------------|-------|-------|-----------------| || |---------|----------|-----------------| +call s:ColorDictParser({ + \ 'Normal' : [ 231, 16, '', 'ffffff', '000000', ''] + \ , 'Visual' : [ 240, 253, '', '585858', 'dadada', ''] + \ + \ , 'Cursor' : [ '', '', '', 'ffffff', 'dd4010', ''] + \ , 'lCursor' : [ '', '', '', 'ffffff', '89b6e2', ''] + \ + \ , 'CursorLine' : [ '', 236, '', '', '3a3a3a', ''] + \ , 'CursorLineNr' : [ 231, 240, '', 'ffffff', '585858', ''] + \ , 'CursorColumn' : [ 231, 237, '', 'ffffff', '3a3a3a', ''] + \ + \ , 'Folded' : [ 249, 234, '', 'b2b2b2', '1c1c1c', ''] + \ , 'FoldColumn' : [ 243, 234, '', '767676', '1c1c1c', ''] + \ , 'SignColumn' : [ 231, 233, 'bold', 'ffffff', '121212', 'bold'] + \ , 'ColorColumn' : [ '', 233, '', '', '262626', ''] + \ + \ , 'StatusLine' : [ 231, 236, 'bold', 'ffffff', '303030', 'bold'] + \ , 'StatusLineNC' : [ 244, 232, '', '808080', '080808', ''] + \ + \ , 'LineNr' : [ 243, 235, '', '767676', '262626', ''] + \ , 'VertSplit' : [ 240, '', '', '585858', '1c1c1c', ''] + \ + \ , 'WildMenu' : [ 234, 231, '', '1c1c1c', 'ffffff', ''] + \ , 'Directory' : [ 143, '', 'bold', 'afaf5f', '', 'bold'] + \ , 'Underlined' : [ 130, '', '', 'af5f00', '', ''] + \ + \ , 'Question' : [ 74, '', 'bold', '5fafd7', '', 'bold'] + \ , 'MoreMsg' : [ 214, '', 'bold', 'ffaf00', '', 'bold'] + \ , 'WarningMsg' : [ 202, '', 'bold', 'ff5f00', '', 'bold'] + \ , 'ErrorMsg' : [ 196, '', 'bold', 'ff0000', '', 'bold'] + \ + \ , 'Comment' : [ 243, 233, '', '767676', '121212', ''] + \ , 'vimCommentTitleLeader' : [ 250, 233, '', 'bcbcbc', '121212', ''] + \ , 'vimCommentTitle' : [ 250, 233, '', 'bcbcbc', '121212', ''] + \ , 'vimCommentString' : [ 245, 233, '', '8a8a8a', '121212', ''] + \ + \ , 'TabLine' : [ 231, 238, '', 'ffffff', '444444', ''] + \ , 'TabLineSel' : [ 255, '', 'bold', 'eeeeee', '', 'bold'] + \ , 'TabLineFill' : [ 240, 238, '', '585858', '444444', ''] + \ , 'TabLineNumber' : [ 160, 238, 'bold', 'd70000', '444444', 'bold'] + \ , 'TabLineClose' : [ 245, 238, 'bold', '8a8a8a', '444444', 'bold'] + \ + \ , 'SpellCap' : [ 231, 31, 'bold', 'ffffff', '0087af', 'bold'] + \ + \ , 'SpecialKey' : [ 239, '', '', '4e4e4e', '', ''] + \ , 'NonText' : [ 88, '', '', '870000', '', ''] + \ , 'MatchParen' : [ 231, 25, 'bold', 'ffffff', '005faf', 'bold'] + \ + \ , 'Constant' : [ 137, '', 'bold', 'af875f', '', 'bold'] + \ , 'Special' : [ 150, '', '', 'afd787', '', ''] + \ , 'Identifier' : [ 66, '', 'bold', '5f8787', '', 'bold'] + \ , 'Statement' : [ 186, '', 'bold', 'd7d787', '', 'bold'] + \ , 'PreProc' : [ 247, '', '', '9e9e9e', '', ''] + \ , 'Type' : [ 67, '', 'bold', '5f87af', '', 'bold'] + \ , 'String' : [ 143, '', '', 'afaf5f', '', ''] + \ , 'Number' : [ 173, '', '', 'd7875f', '', ''] + \ , 'Define' : [ 173, '', '', 'd7875f', '', ''] + \ , 'Error' : [ 208, 124, '', 'ff8700', 'af0000', ''] + \ , 'Function' : [ 179, '', '', 'd7af5f', '', ''] + \ , 'Include' : [ 173, '', '', 'd7875f', '', ''] + \ , 'PreCondit' : [ 173, '', '', 'd7875f', '', ''] + \ , 'Keyword' : [ 173, '', '', 'd7875f', '', ''] + \ , 'Search' : [ 231, 131, '', '000000', 'ffff5f', 'underline,bold'] + \ , 'Title' : [ 231, '', '', 'ffffff', '', ''] + \ , 'Delimiter' : [ 246, '', '', '949494', '', ''] + \ , 'StorageClass' : [ 187, '', '', 'd7d7af', '', ''] + \ , 'Operator' : [ 180, '', '', 'd7af87', '', ''] + \ + \ , 'TODO' : [ 228, 94, 'bold', 'ffff87', '875f00', 'bold'] + \ + \ , 'SyntasticWarning' : [ 220, 94, '', 'ffff87', '875f00', 'bold'] + \ , 'SyntasticError' : [ 202, 52, '', 'ffff87', '875f00', 'bold'] + \ + \ , 'Pmenu' : [ 248, 240, '', 'a8a8a8', '585858', ''] + \ , 'PmenuSel' : [ 253, 245, '', 'dadada', '8a8a8a', ''] + \ , 'PmenuSbar' : [ 253, 248, '', 'dadada', 'a8a8a8', ''] + \ + \ , 'phpEOL' : [ 245, '', '', 'dadada', '', ''] + \ , 'phpStringDelim' : [ 94, '', '', '875f00', '', ''] + \ , 'phpDelimiter' : [ 160, '', '', 'd70000', '', ''] + \ , 'phpFunctions' : [ 221, '', 'bold', 'ffd75f', '', 'bold'] + \ , 'phpBoolean' : [ 172, '', 'bold', 'd78700', '', 'bold'] + \ , 'phpOperator' : [ 215, '', '', 'ffaf5f', '', ''] + \ , 'phpMemberSelector' : [ 138, '', 'bold', 'af8787', '', 'bold'] + \ , 'phpParent' : [ 227, '', '', 'ffff5f', '', ''] + \ + \ , 'PHPClassTag' : [ 253, '', '', 'dadada', '', ''] + \ , 'PHPInterfaceTag' : [ 253, '', '', 'dadada', '', ''] + \ , 'PHPFunctionTag' : [ 222, '', 'bold', 'ffd787', '', 'bold'] + \ + \ , 'pythonDocString' : [ 240, 233, '', '585858', '121212', ''] + \ , 'pythonDocStringTitle' : [ 245, 233, '', 'dadada', '121212', ''] + \ , 'pythonRun' : [ 65, '', '', '5f875f', '', ''] + \ , 'pythonBuiltinObj' : [ 67, '', 'bold', '5f87af', '', 'bold'] + \ , 'pythonSelf' : [ 250, '', 'bold', 'bcbcbc', '', 'bold'] + \ , 'pythonFunction' : [ 179, '', 'bold', 'd7af5f', '', 'bold'] + \ , 'pythonClass' : [ 221, '', 'bold', 'ffd75f', '', 'bold'] + \ , 'pythonExClass' : [ 130, '', '', 'af5f00', '', ''] + \ , 'pythonException' : [ 130, '', 'bold', 'af5f00', '', 'bold'] + \ , 'pythonOperator' : [ 186, '', '', 'd7d787', '', ''] + \ , 'pythonPreCondit' : [ 152, '', 'bold', 'afd7d7', '', 'bold'] + \ , 'pythonDottedName' : [ 166, '', '', 'd75f00', '', ''] + \ , 'pythonDecorator' : [ 124, '', 'bold', 'af0000', '', 'bold'] + \ + \ , 'PythonInterfaceTag' : [ 109, '', '', '87afaf', '', ''] + \ , 'PythonClassTag' : [ 221, '', '', 'ffd75f', '', ''] + \ , 'PythonFunctionTag' : [ 109, '', '', '87afaf', '', ''] + \ , 'PythonVariableTag' : [ 253, '', '', 'dadada', '', ''] + \ , 'PythonMemberTag' : [ 145, '', '', 'afafaf', '', ''] + \ + \ , 'CTagsImport' : [ 109, '', '', '87afaf', '', ''] + \ , 'CTagsClass' : [ 221, '', '', 'ffd75f', '', ''] + \ , 'CTagsFunction' : [ 109, '', '', '87afaf', '', ''] + \ , 'CTagsGlobalVariable' : [ 253, '', '', 'dadada', '', ''] + \ , 'CTagsMember' : [ 145, '', '', 'afafaf', '', ''] + \ + \ , 'xmlTag' : [ 149, '', 'bold', 'afd75f', '', 'bold'] + \ , 'xmlTagName' : [ 250, '', '', 'bcbcbc', '', ''] + \ , 'xmlEndTag' : [ 209, '', 'bold', 'ff875f', '', 'bold'] + \ + \ , 'cssImportant' : [ 166, '', 'bold', 'd75f00', '', 'bold'] + \ + \ , 'DiffAdd' : [ 112, 22, '', '87d700', '005f00', ''] + \ , 'DiffChange' : [ 220, 94, '', 'ffd700', '875f00', ''] + \ , 'DiffDelete' : [ 160, '', '', 'd70000', '', ''] + \ , 'DiffText' : [ 220, 94, 'reverse,bold', 'ffd700', '875f00', 'reverse,bold'] + \ + \ , 'diffLine' : [ 68, '', 'bold', '5f87d7', '', 'bold'] + \ , 'diffFile' : [ 242, '', '', '6c6c6c', '', ''] + \ , 'diffNewFile' : [ 242, '', '', '6c6c6c', '', ''] +\ }) + +hi link htmlTag xmlTag +hi link htmlTagName xmlTagName +hi link htmlEndTag xmlEndTag + +hi link phpCommentTitle vimCommentTitle +hi link phpDocTags vimCommentString +hi link phpDocParam vimCommentTitle + +hi link diffAdded DiffAdd +hi link diffChanged DiffChange +hi link diffRemoved DiffDelete diff --git a/.vim/colors/getfresh.vim b/.vim/colors/getfresh.vim new file mode 100644 index 0000000..21809e6 --- /dev/null +++ b/.vim/colors/getfresh.vim @@ -0,0 +1,194 @@ +" Vim color scheme +" +" Name: getfresh.vim +" Maintainer: Christian Brassat +" License: public domain +" + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "getfresh" + +" General Colors +let NormalFG = '#DDCCBB' + +"let NormalFG = '#30251D' +let NormalBG = '#151515' + +let DarkGray = '#393939' +let LightGray = '#AF875F' + +let DarkRed = '#BF1E2D' +let LightRed = '#E7212A' + +let DarkGreen = '#9DBA3A' +let LightGreen = '#A9C938' + +let DarkYellow = '#F5B915' +let LightYellow = '#F7D325' + +let DarkBlue = '#1CA1DB' +let LightBlue = '#00AFDA' + +let DarkMagenta = '#652F90' +let LightMagenta = '#894E9F' + +let DarkCyan = '#EA7D24' +let LightCyan = '#F79321' + +let White = '#E7E8E9' + +" Specific Colors +let CursorColor = '#FF8939' +let CursorLColor = '#202020' + +let LineNrFG = '#555555' +let LineNrBG = '#101010' + +let FoldFG = DarkCyan +let FoldLineBG = NormalBG +let FoldColBG = '#050505' + +let SplitFG = '#1B1B1B' +let SplitBG = SplitFG + +let StatusBG = DarkGray + +" GUI - bold/italic/underline/none +let GUI = 'none' + +" Different Font +let OtherFont = '-*-Mensch-*-*-*-8-*-*-*-*-*-*-*' + +" hi LineNr ctermfg='#555555' ctermbg='#101010' + +exe 'hi Nontext guifg='.LightGray +exe 'hi Normal guifg='.NormalFG.' guibg='.NormalBG +exe 'hi Cursor guibg='.CursorColor +exe 'hi CursorLine guibg='.CursorLColor +exe 'hi LineNr guifg='.LineNrFG.' guibg='.LineNrBG + + +hi LineNr ctermbg=233 ctermfg=237 +hi VertSplit ctermbg=234 ctermfg=235 +hi statusline ctermbg=10 ctermfg=234 +hi NonText ctermfg=11 +hi Directory ctermfg=2 +hi Visual ctermbg=235 + +hi Normal ctermfg=252 + + +hi Comment ctermfg=237 + +hi Function ctermfg=1 +hi String ctermfg=255 cterm=bold +hi Define ctermfg=227 cterm=bold +hi Constant ctermfg=darkblue +hi Identifier ctermfg=darkblue +hi Statement ctermfg=10 cterm=bold + + +exe 'hi Search guibg='.DarkCyan +exe 'hi VertSplit guifg='.SplitFG.' guibg='.SplitBG +exe 'hi Visual guibg='.DarkCyan +exe 'hi Folded guifg='.FoldFG.' guibg='.FoldLineBG +exe 'hi FoldColumn guifg='.FoldFG.' guibg='.FoldColBG +exe 'hi Directory guifg='.LightGreen +exe 'hi Pmenu guifg='.NormalFG.' guibg='.LightGray +exe 'hi PmenuSel guifg='.DarkGray.' guibg='.LightGreen +exe 'hi PMenuSbar guibg='.DarkCyan +exe 'hi PMenuThumb guibg='.DarkGreen +exe 'hi Comment guifg='.LightGray.' font='.OtherFont +exe 'hi Todo guifg='.LightGray.' guibg=NONE' +exe 'hi NonText guifg='.DarkCyan +exe 'hi SpecialKey guifg='.DarkCyan +exe 'hi Constant guifg='.DarkBlue +exe 'hi Define guifg='.White.' gui='.GUI +exe 'hi Delimiter guifg='.DarkMagenta +exe 'hi Error guifg='.DarkGray.' guibg='.DarkRed +exe 'hi Function guifg='.DarkRed.' gui='.GUI +exe 'hi Identifier guifg='.LightYellow +exe 'hi Include guifg='.DarkYellow.' gui='.GUI +exe 'hi Keyword guifg='.DarkMagenta +exe 'hi Macro guifg='.DarkMagenta +exe 'hi Number guifg='.LightGreen +exe 'hi PreCondit guifg='.DarkMagenta.' gui='.GUI +exe 'hi PreProc guifg='.DarkYellow +exe 'hi Statement guifg='.LightBlue.' gui='.GUI +exe 'hi String guifg='.White +exe 'hi Title guifg='.LightGray +exe 'hi Type guifg='.DarkRed.' gui='.GUI +exe 'hi DiffAdd guifg='.DarkGray.' guibg='.LightGreen +exe 'hi DiffDelete guifg='.DarkGray.' guibg='.LightRed + +hi link htmlTag xmlTag +hi link htmlTagName xmlTagName +hi link htmlEndTag xmlEndTag + +exe 'hi xmlTag guifg='.LightMagenta +exe 'hi xmlTagName guifg='.LightMagenta +exe 'hi xmlEndTag guifg='.LightMagenta + +" Status line - changes colors depending on insert mode +" Standard +exe 'hi User1 guifg='.DarkYellow.' guibg='.StatusBG.' gui='.GUI +exe 'hi User2 guifg='.DarkRed.' guibg='.StatusBG.' gui='.GUI +exe 'hi User3 guifg='.LightGreen.' guibg='.StatusBG.' gui='.GUI +exe 'hi User4 guifg='.DarkGray.' guibg='.DarkMagenta.' gui='.GUI +exe 'hi User5 guifg='.NormalFG.' guibg='.StatusBG +exe 'hi User6 guifg='.LightGray.' guibg='.StatusBG +exe 'hi User7 guifg='.StatusBG.' guibg='.StatusBG.' gui='.GUI +exe 'hi StatusLine guifg='.NormalFG.' guibg='.StatusBG.' gui='.GUI +exe 'hi StatusLineNC guifg='.LightGray.' guibg='.StatusBG.' gui='.GUI + +" Statusbar Highlight +hi User1 ctermbg=235 ctermfg=3 cterm=bold +hi User2 ctermbg=235 ctermfg=1 cterm=bold +hi User3 ctermbg=235 ctermfg=10 cterm=bold +hi User4 ctermbg=244 ctermfg=235 cterm=bold +hi User5 ctermbg=235 ctermfg=243 +hi User6 ctermbg=235 ctermfg=12 +hi User7 ctermbg=235 ctermfg=235 +hi StatusLineNC ctermbg=235 ctermfg=3 +hi StatusLine + +function! InsertStatuslineColorTerm(mode) + if a:mode == 'i' "Insert Mode + hi User4 ctermfg=235 ctermbg=5 + + elseif a:mode == 'r' + hi User4 ctermfg=235 ctermbg=2 + + else + hi User4 ctermfg=235 ctermbg=1 + +endfunction + + +function! InsertStatuslineColor(mode) + let DarkGray = '#101010' + let DarkRed = '#E84F4F' + let DarkBlue = '#7DC1CF' + let DarkMagenta = '#9B64FB' + + if a:mode == 'i' " Insert Mode + exe 'hi User4 guifg='.DarkGray.' guibg='.DarkBlue + + elseif a:mode == 'r' " Replace Mode + exe 'hi User4 guifg='.DarkGray.' guibg='.DarkRed + + else + exe 'hi User4 guifg='.DarkGray.' guibg='.DarkMagenta + + endif +endfunction + +" Call function +exe 'au InsertEnter * call InsertStatuslineColor(v:insertmode)' +exe 'au InsertLeave * hi statusline guifg='.NormalFG.' guibg='.StatusBG +exe 'au InsertLeave * hi User4 guifg='.DarkGray.' guibg='.DarkMagenta +exe 'aw InsertEnter * call InsertStatusLineColorTerm(v:insertmode)' diff --git a/.vim/colors/hybrid.vim b/.vim/colors/hybrid.vim new file mode 100644 index 0000000..feb3650 --- /dev/null +++ b/.vim/colors/hybrid.vim @@ -0,0 +1,430 @@ +" File: hybrid.vim +" Maintainer: Andrew Wong (w0ng) +" URL: https://github.com/w0ng/vim-hybrid +" Modified: 27 Jan 2013 07:33 AM AEST +" License: MIT + +" Description:"{{{ +" ---------------------------------------------------------------------------- +" The RGB colour palette is taken from Tomorrow-Night.vim: +" https://github.com/chriskempson/vim-tomorrow-theme +" +" The syntax highlighting scheme is taken from jellybeans.vim: +" https://github.com/nanotech/jellybeans.vim +" +" The is code taken from solarized.vim: +" https://github.com/altercation/vim-colors-solarized + +"}}} +" Requirements And Recommendations:"{{{ +" ---------------------------------------------------------------------------- +" This colourscheme is intended for use on: +" - gVim 7.3 for Linux, Mac and Windows +" - Vim 7.3 for Linux, using a 256 colour enabled terminal +" +" By default, Vim will use the closest matching cterm equivalent of the RGB +" colours. +" +" However, Due to the limited 256 palette, colours in Vim and gVim will still +" be noticeably different. In order to get a uniform appearance and the way +" that this colourscheme was intended, it is HIGHLY recommended that you: +" +" 1. Add these colours to ~/.Xresources: +" +" https://gist.github.com/3278077 +" +" 2. Use Xresources colours by setting in ~/.vimrc: +" +" let g:hybrid_use_Xresources = 1 +" colorscheme hybrid +" +" For iTerm2 users: +" +" 1. Install this color preset on your iTerm2: +" +" https://github.com/w0ng/dotfiles/blob/master/iterm2/hybrid.itermcolors +" +" 2. Use iTerm colours by setting in ~/.vimrc: +" +" let g:hybrid_use_Xresources = 1 +" colorscheme hybrid +" + +"}}} +" Initialisation:"{{{ +" ---------------------------------------------------------------------------- + +if !exists("g:hybrid_use_Xresources") + let g:hybrid_use_Xresources = 0 +endif + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let s:style = &background + +let g:colors_name = "hybrid" + +"}}} +" GUI And Cterm Palettes:"{{{ +" ---------------------------------------------------------------------------- + +let s:palette = {'gui' : {} , 'cterm' : {}} + +let s:palette.gui.background = { 'dark' : "#1d1f21", 'light' : "#e4e4e4" } +let s:palette.gui.foreground = { 'dark' : "#c5c8c6", 'light' : "#000000" } +let s:palette.gui.selection = { 'dark' : "#373b41", 'light' : "#bcbcbc" } +let s:palette.gui.line = { 'dark' : "#282a2e", 'light' : "#d0d0d0" } +let s:palette.gui.comment = { 'dark' : "#707880", 'light' : "#5f5f5f" } +let s:palette.gui.red = { 'dark' : "#cc6666", 'light' : "#5f0000" } +let s:palette.gui.orange = { 'dark' : "#de935f", 'light' : "#875f00" } +let s:palette.gui.yellow = { 'dark' : "#f0c674", 'light' : "#5f5f00" } +let s:palette.gui.green = { 'dark' : "#b5bd68", 'light' : "#005f00" } +let s:palette.gui.aqua = { 'dark' : "#8abeb7", 'light' : "#005f5f" } +let s:palette.gui.blue = { 'dark' : "#81a2be", 'light' : "#00005f" } +let s:palette.gui.purple = { 'dark' : "#b294bb", 'light' : "#5f005f" } +let s:palette.gui.window = { 'dark' : "#303030", 'light' : "#9e9e9e" } +let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c", 'light' : "#808080" } +let s:palette.gui.addbg = { 'dark' : "#5F875F", 'light' : "#d7ffd7" } +let s:palette.gui.addfg = { 'dark' : "#d7ffaf", 'light' : "#005f00" } +let s:palette.gui.changebg = { 'dark' : "#5F5F87", 'light' : "#d7d7ff" } +let s:palette.gui.changefg = { 'dark' : "#d7d7ff", 'light' : "#5f005f" } +let s:palette.gui.delbg = { 'dark' : "#cc6666", 'light' : "#ffd7d7" } +let s:palette.gui.darkblue = { 'dark' : "#00005f", 'light' : "#d7ffd7" } +let s:palette.gui.darkcyan = { 'dark' : "#005f5f", 'light' : "#005f00" } +let s:palette.gui.darkred = { 'dark' : "#5f0000", 'light' : "#d7d7ff" } +let s:palette.gui.darkpurple = { 'dark' : "#5f005f", 'light' : "#5f005f" } + +let s:palette.cterm.background = { 'dark' : "234", 'light' : "254" } +let s:palette.cterm.window = { 'dark' : "236", 'light' : "247" } +let s:palette.cterm.darkcolumn = { 'dark' : "234", 'light' : "244" } +let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" } +let s:palette.cterm.addfg = { 'dark' : "193", 'light' : "22" } +let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" } +let s:palette.cterm.changefg = { 'dark' : "189", 'light' : "53" } +let s:palette.cterm.darkblue = { 'dark' : "17", 'light' : "194" } +let s:palette.cterm.darkcyan = { 'dark' : "24", 'light' : "22" } +let s:palette.cterm.darkred = { 'dark' : "52", 'light' : "189" } +let s:palette.cterm.darkpurple = { 'dark' : "53", 'light' : "53" } + +if g:hybrid_use_Xresources == 1 + let s:palette.cterm.foreground = { 'dark' : "15" } " White + let s:palette.cterm.selection = { 'dark' : "8" } " DarkGrey + let s:palette.cterm.line = { 'dark' : "0" } " Black + let s:palette.cterm.comment = { 'dark' : "7" } " LightGrey + let s:palette.cterm.red = { 'dark' : "9" } " LightRed + let s:palette.cterm.orange = { 'dark' : "3" } " DarkYellow + let s:palette.cterm.yellow = { 'dark' : "11" } " LightYellow + let s:palette.cterm.green = { 'dark' : "10" } " LightGreen + let s:palette.cterm.aqua = { 'dark' : "14" } " LightCyan + let s:palette.cterm.blue = { 'dark' : "12" } " LightBlue + let s:palette.cterm.purple = { 'dark' : "13" } " LightMagenta + let s:palette.cterm.delbg = { 'dark' : "9" } " LightRed +else + let s:palette.cterm.foreground = { 'dark' : "250" } + let s:palette.cterm.selection = { 'dark' : "237" } + let s:palette.cterm.line = { 'dark' : "235" } + let s:palette.cterm.comment = { 'dark' : "243" } + let s:palette.cterm.red = { 'dark' : "167" } + let s:palette.cterm.orange = { 'dark' : "173" } + let s:palette.cterm.yellow = { 'dark' : "221" } + let s:palette.cterm.green = { 'dark' : "143" } + let s:palette.cterm.aqua = { 'dark' : "109" } + let s:palette.cterm.blue = { 'dark' : "110" } + let s:palette.cterm.purple = { 'dark' : "139" } + let s:palette.cterm.delbg = { 'dark' : "167" } +endif + +let s:palette.cterm.foreground.light = "16" +let s:palette.cterm.selection.light = "250" +let s:palette.cterm.line.light = "252" +let s:palette.cterm.comment.light = "59" +let s:palette.cterm.red.light = "52" +let s:palette.cterm.orange.light = "94" +let s:palette.cterm.yellow.light = "58" +let s:palette.cterm.green.light = "22" +let s:palette.cterm.aqua.light = "23" +let s:palette.cterm.blue.light = "17" +let s:palette.cterm.purple.light = "53" +let s:palette.cterm.delbg.light = "224" + +"}}} +" Formatting Options:"{{{ +" ---------------------------------------------------------------------------- +let s:none = "NONE" +let s:t_none = "NONE" +let s:n = "NONE" +let s:c = ",undercurl" +let s:r = ",reverse" +let s:s = ",standout" +let s:b = ",bold" +let s:u = ",underline" +let s:i = ",italic" + +"}}} +" Highlighting Primitives:"{{{ +" ---------------------------------------------------------------------------- +function! s:build_prim(hi_elem, field) + " Given a:hi_elem = bg, a:field = comment + let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment + let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=... + let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=... + exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'" +endfunction + +let s:bg_none = ' guibg=NONE ctermbg=NONE' +call s:build_prim('bg', 'foreground') +call s:build_prim('bg', 'background') +call s:build_prim('bg', 'selection') +call s:build_prim('bg', 'line') +call s:build_prim('bg', 'comment') +call s:build_prim('bg', 'red') +call s:build_prim('bg', 'orange') +call s:build_prim('bg', 'yellow') +call s:build_prim('bg', 'green') +call s:build_prim('bg', 'aqua') +call s:build_prim('bg', 'blue') +call s:build_prim('bg', 'purple') +call s:build_prim('bg', 'window') +call s:build_prim('bg', 'darkcolumn') +call s:build_prim('bg', 'addbg') +call s:build_prim('bg', 'addfg') +call s:build_prim('bg', 'changebg') +call s:build_prim('bg', 'changefg') +call s:build_prim('bg', 'delbg') +call s:build_prim('bg', 'darkblue') +call s:build_prim('bg', 'darkcyan') +call s:build_prim('bg', 'darkred') +call s:build_prim('bg', 'darkpurple') + +let s:fg_none = ' guifg=NONE ctermfg=NONE' +call s:build_prim('fg', 'foreground') +call s:build_prim('fg', 'background') +call s:build_prim('fg', 'selection') +call s:build_prim('fg', 'line') +call s:build_prim('fg', 'comment') +call s:build_prim('fg', 'red') +call s:build_prim('fg', 'orange') +call s:build_prim('fg', 'yellow') +call s:build_prim('fg', 'green') +call s:build_prim('fg', 'aqua') +call s:build_prim('fg', 'blue') +call s:build_prim('fg', 'purple') +call s:build_prim('fg', 'window') +call s:build_prim('fg', 'darkcolumn') +call s:build_prim('fg', 'addbg') +call s:build_prim('fg', 'addfg') +call s:build_prim('fg', 'changebg') +call s:build_prim('fg', 'changefg') +call s:build_prim('fg', 'darkblue') +call s:build_prim('fg', 'darkcyan') +call s:build_prim('fg', 'darkred') +call s:build_prim('fg', 'darkpurple') + +exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'" +exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'" +exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'" +exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'" +exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" +exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'" +exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'" +exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'" +exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'" +exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'" +exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'" + +exe "let s:sp_none = ' guisp=".s:none ."'" +exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'" +exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'" +exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'" +exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'" +exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'" +exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'" +exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'" +exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'" +exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'" +exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'" +exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'" +exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'" +exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'" +exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'" +exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'" +exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'" +exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'" +exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'" +exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'" +exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'" +exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'" + +"}}} +" Vim Highlighting: (see :help highlight-groups)"{{{ +" ---------------------------------------------------------------------------- +exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none +" Conceal" +" Cursor" +" CursorIM" +exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none +exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none +exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none +exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none +exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none +exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none +exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd +exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none +exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none +exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none +exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none +" Incsearch" +exe "hi! LineNr" .s:fg_selection .s:bg_none .s:fmt_none +exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none +exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none +exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none +exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none +exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none +exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr +" PmenuSbar" +" PmenuThumb" +exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none +exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none +exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none +exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr +exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr +exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr +exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr +exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr +exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr +exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr +" TabLineFill" +" TabLineSel" +exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none +" VisualNos" +exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none +hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline +" WildMenu" + +" Use Xresources for background colour +if has('gui_running') || g:hybrid_use_Xresources != 1 + exe "hi! Normal" .s:fg_foreground .s:bg_background .s:fmt_none +else + exe "hi! Normal" .s:fg_foreground .s:bg_none .s:fmt_none +endif + +"}}} +" Generic Syntax Highlighting: (see :help group-name)"{{{ +" ---------------------------------------------------------------------------- +exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none + +exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none +exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none +" Character" +" Number" +" Boolean" +" Float" + +exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none +exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none + +exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none +" Conditional" +" Repeat" +" Label" +exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none +" Keyword" +" Exception" + +exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none +" Include" +" Define" +" Macro" +" PreCondit" + +exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none +" StorageClass" +exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none +" Typedef" + +exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none +" SpecialChar" +" Tag" +" Delimiter" +" SpecialComment" +" Debug" +" +exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none + +exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none + +exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr + +exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none + +" Quickfix window highlighting +exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none +" qfFileName" +" qfLineNr" +" qfError" + +"}}} +" Diff Syntax Highlighting:"{{{ +" ---------------------------------------------------------------------------- +" Diff +" diffOldFile +" diffNewFile +" diffFile +" diffOnly +" diffIdentical +" diffDiffer +" diffBDiffer +" diffIsA +" diffNoEOL +" diffCommon +hi! link diffRemoved Constant +" diffChanged +hi! link diffAdded Special +" diffLine +" diffSubname +" diffComment + +"}}} +" +" This is needed for some reason: {{{ + +let &background = s:style + +" }}} +" Legal:"{{{ +" ---------------------------------------------------------------------------- +" Copyright (c) 2011 Ethan Schoonover +" Copyright (c) 2009-2012 NanoTech +" Copyright (c) 2012 w0ng +" +" Permission is hereby granted, free of charge, to any per‐ +" son obtaining a copy of this software and associated doc‐ +" umentation files (the “Software”), to deal in the Soft‐ +" ware without restriction, including without limitation +" the rights to use, copy, modify, merge, publish, distrib‐ +" ute, sublicense, and/or sell copies of the Software, and +" to permit persons to whom the Software is furnished to do +" so, subject to the following conditions: +" +" The above copyright notice and this permission notice +" shall be included in all copies or substantial portions +" of the Software. +" +" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY +" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐ +" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐ +" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐ +" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +" THE SOFTWARE. + +" }}} diff --git a/.vim/colors/jellybeans.vim b/.vim/colors/jellybeans.vim new file mode 100644 index 0000000..606d558 --- /dev/null +++ b/.vim/colors/jellybeans.vim @@ -0,0 +1,491 @@ +" Vim color file +" +" " __ _ _ _ " +" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ " +" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| " +" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ " +" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ " +" " \___/ " +" +" "A colorful, dark color scheme for Vim." +" +" File: jellybeans.vim +" Maintainer: NanoTech +" Version: 1.5 +" Last Change: January 15th, 2012 +" Contributors: Daniel Herbert , +" Henry So, Jr. , +" David Liang , +" Rich Healey (richoH), +" Andrew Wong (w0ng) +" +" Copyright (c) 2009-2012 NanoTech +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +" THE SOFTWARE. + +set background=dark + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "jellybeans" + +if has("gui_running") || &t_Co == 88 || &t_Co == 256 + let s:low_color = 0 +else + let s:low_color = 1 +endif + +" Color approximation functions by Henry So, Jr. and David Liang {{{ +" Added to jellybeans.vim by Daniel Herbert + +" returns an approximate grey index for the given grey level +fun! s: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! s: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! s:grey_color(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 color index for the given color level +fun! s: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 color level for the given color index +fun! s: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 color indices +fun! s:rgb_color(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 color levels +fun! s:color(r, g, b) + " get the closest grey + let l:gx = s:grey_number(a:r) + let l:gy = s:grey_number(a:g) + let l:gz = s:grey_number(a:b) + + " get the closest color + let l:x = s:rgb_number(a:r) + let l:y = s:rgb_number(a:g) + let l:z = s:rgb_number(a:b) + + if l:gx == l:gy && l:gy == l:gz + " there are two possibilities + let l:dgr = s:grey_level(l:gx) - a:r + let l:dgg = s:grey_level(l:gy) - a:g + let l:dgb = s:grey_level(l:gz) - a:b + let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) + let l:dr = s:rgb_level(l:gx) - a:r + let l:dg = s:rgb_level(l:gy) - a:g + let l:db = s: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 s:grey_color(l:gx) + else + " use the color + return s:rgb_color(l:x, l:y, l:z) + endif + else + " only one possibility + return s:rgb_color(l:x, l:y, l:z) + endif +endfun + +" returns the palette index to approximate the 'rrggbb' hex string +fun! s: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 s:color(l:r, l:g, l:b) +endfun + +" sets the highlighting for the given group +fun! s:X(group, fg, bg, attr, lcfg, lcbg) + if s:low_color + let l:fge = empty(a:lcfg) + let l:bge = empty(a:lcbg) + + if !l:fge && !l:bge + exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg + elseif !l:fge && l:bge + exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE" + elseif l:fge && !l:bge + exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg + endif + else + let l:fge = empty(a:fg) + let l:bge = empty(a:bg) + + if !l:fge && !l:bge + exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg) + elseif !l:fge && l:bge + exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE" + elseif l:fge && !l:bge + exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg) + endif + endif + + if a:attr == "" + exec "hi ".a:group." gui=none cterm=none" + else + let noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",") + if empty(noitalic) + let noitalic = "none" + endif + exec "hi ".a:group." gui=".a:attr." cterm=".noitalic + endif +endfun +" }}} + +call s:X("Normal","e8e8d3","151515","","White","") +set background=dark + +if !exists("g:jellybeans_use_lowcolor_black") || g:jellybeans_use_lowcolor_black + let s:termBlack = "Black" +else + let s:termBlack = "Grey" +endif + +if version >= 700 + call s:X("CursorLine","","1c1c1c","","",s:termBlack) + call s:X("CursorColumn","","1c1c1c","","",s:termBlack) + call s:X("MatchParen","ffffff","80a090","bold","","DarkCyan") + + call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack) + call s:X("TabLineFill","9098a0","","","",s:termBlack) + call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White") + + " Auto-completion + call s:X("Pmenu","ffffff","606060","","White",s:termBlack) + call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White") +endif + +call s:X("Visual","","404040","","",s:termBlack) +call s:X("Cursor","","b0d0f0","","","") + +call s:X("LineNr","605958","151515","none",s:termBlack,"") +call s:X("Comment","888888","","italic","Grey","") +call s:X("Todo","808080","","bold","White",s:termBlack) + +call s:X("StatusLine","000000","dddddd","italic","","White") +call s:X("StatusLineNC","ffffff","403c41","italic","White","Black") +call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack) +call s:X("WildMenu","f0a0c0","302028","","Magenta","") + +call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"") +call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack) +call s:X("SignColumn","777777","333333","","",s:termBlack) +call s:X("ColorColumn","","000000","","",s:termBlack) + +call s:X("Title","70b950","","bold","Green","") + +call s:X("Constant","cf6a4c","","","Red","") +call s:X("Special","799d6a","","","Green","") +call s:X("Delimiter","668799","","","Grey","") + +call s:X("String","99ad6a","","","Green","") +call s:X("StringDelimiter","556633","","","DarkGreen","") + +call s:X("Identifier","c6b6ee","","","LightCyan","") +call s:X("Structure","8fbfdc","","","LightCyan","") +call s:X("Function","fad07a","","","Yellow","") +call s:X("Statement","8197bf","","","DarkBlue","") +call s:X("PreProc","8fbfdc","","","LightBlue","") + +hi! link Operator Normal + +call s:X("Type","ffb964","","","Yellow","") +call s:X("NonText","606060","151515","",s:termBlack,"") + +call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"") + +call s:X("Search","f0a0c0","302028","underline","Magenta","") + +call s:X("Directory","dad085","","","Yellow","") +call s:X("ErrorMsg","","902020","","","DarkRed") +hi! link Error ErrorMsg +hi! link MoreMsg Special +call s:X("Question","65C254","","","Green","") + + +" Spell Checking + +call s:X("SpellBad","","902020","underline","","DarkRed") +call s:X("SpellCap","","0000df","underline","","Blue") +call s:X("SpellRare","","540063","underline","","DarkMagenta") +call s:X("SpellLocal","","2D7067","underline","","Green") + +" Diff + +hi! link diffRemoved Constant +hi! link diffAdded String + +" VimDiff + +call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen") +call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed") +call s:X("DiffChange","","2B5B77","","White","DarkBlue") +call s:X("DiffText","8fbfdc","000000","reverse","Yellow","") + +" PHP + +hi! link phpFunctions Function +call s:X("StorageClass","c59f6f","","","Red","") +hi! link phpSuperglobal Identifier +hi! link phpQuoteSingle StringDelimiter +hi! link phpQuoteDouble StringDelimiter +hi! link phpBoolean Constant +hi! link phpNull Constant +hi! link phpArrayPair Operator + +" Ruby + +hi! link rubySharpBang Comment +call s:X("rubyClass","447799","","","DarkBlue","") +call s:X("rubyIdentifier","c6b6fe","","","Cyan","") +hi! link rubyConstant Type +hi! link rubyFunction Function + +call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","") +call s:X("rubySymbol","7697d6","","","Blue","") +hi! link rubyGlobalVariable rubyInstanceVariable +hi! link rubyModule rubyClass +call s:X("rubyControl","7597c6","","","Blue","") + +hi! link rubyString String +hi! link rubyStringDelimiter StringDelimiter +hi! link rubyInterpolationDelimiter Identifier + +call s:X("rubyRegexpDelimiter","540063","","","Magenta","") +call s:X("rubyRegexp","dd0093","","","DarkMagenta","") +call s:X("rubyRegexpSpecial","a40073","","","Magenta","") + +call s:X("rubyPredefinedIdentifier","de5577","","","Red","") + +" JavaScript + +hi! link javaScriptValue Constant +hi! link javaScriptRegexpString rubyRegexp + +" CoffeeScript + +hi! link coffeeRegExp javaScriptRegexpString + +" Lua + +hi! link luaOperator Conditional + +" C + +hi! link cOperator Constant + +" Objective-C/Cocoa + +hi! link objcClass Type +hi! link cocoaClass objcClass +hi! link objcSubclass objcClass +hi! link objcSuperclass objcClass +hi! link objcDirective rubyClass +hi! link objcStatement Constant +hi! link cocoaFunction Function +hi! link objcMethodName Identifier +hi! link objcMethodArg Normal +hi! link objcMessageName Identifier + +" Debugger.vim + +call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue") +call s:X("DbgBreakPt","","4F0037","","","DarkMagenta") + +" vim-indent-guides + +if !exists("g:indent_guides_auto_colors") + let g:indent_guides_auto_colors = 0 +endif +call s:X("IndentGuidesOdd","","202020","","","") +call s:X("IndentGuidesEven","","1c1c1c","","","") + +" Plugins, etc. + +hi! link TagListFileName Directory +call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green") + +" Manual overrides for 256-color terminals. Dark colors auto-map badly. +if !s:low_color + hi StatusLineNC ctermbg=235 + hi Folded ctermbg=236 + hi FoldColumn ctermbg=234 + hi SignColumn ctermbg=236 + hi CursorColumn ctermbg=234 + hi CursorLine ctermbg=234 + hi SpecialKey ctermbg=234 + hi NonText ctermbg=233 + hi LineNr ctermbg=233 + hi DiffText ctermfg=81 + hi Normal ctermbg=233 + hi DbgBreakPt ctermbg=53 +endif + +" delete functions {{{ +delf s:X +delf s:rgb +delf s:color +delf s:rgb_color +delf s:rgb_level +delf s:rgb_number +delf s:grey_color +delf s:grey_level +delf s:grey_number +" }}} diff --git a/.vim/colors/nucolors.vim b/.vim/colors/nucolors.vim new file mode 100644 index 0000000..c2e5e2c --- /dev/null +++ b/.vim/colors/nucolors.vim @@ -0,0 +1,162 @@ +" Vim color scheme +" +" Name: nucolors.vim +" Maintainer: Christian Brassat +" License: public domain +" +" Based on a port of the RailsCasts TextMate theme [1] to Vim. +" Some parts of this theme were borrowed from the well-documented Lucius theme [2]. +" +" [1] http://railscasts.com/about +" [2] http://www.vim.org/scripts/script.php?script_id=2536 + +set background=dark +hi clear +if exists("syntax_on") + syntax reset +endif +let g:colors_name = "nucolors" + +" Colors +" Brown #FFFFB9 +" Dark Blue #7DC1CF +" Dark Green #B8D68F +" Dark Orange #E1AA5D +" Light Blue #4E9FB1 +" Light Green #A0CF5D +" Tan #F39D21 +" Red #E84F4F +" +hi Nontext guifg=#404040 +hi Normal guifg=#E6E1DC guibg=#151515 +hi Cursor guibg=#FF8939 +hi CursorLine guibg=#202020 +hi LineNr guifg=#665544 guibg=#101010 +hi Search guibg=#5A647E +hi VertSplit guifg=#1b1b1b guibg=#1b1b1b +hi Visual guibg=#5A647E + +" Folds +" line used for closed folds +hi Folded guifg=#5A647E guibg=#202020 +hi FoldColumn guifg=#505050 guibg=#050505 + +" Misc +" ---- +" directory names and other special names in listings +hi Directory guifg=#A0CF5D + +" Popup Menu +" ---------- +" normal item in popup +hi Pmenu guifg=#F6F3E8 guibg=#444444 +" selected item in popup +hi PmenuSel guifg=#000000 guibg=#A0CF5D +" scrollbar in popup +hi PMenuSbar guibg=#5A647E +" thumb of the scrollbar in the popup +hi PMenuThumb guibg=#AAAAAA + + +"rubyComment +hi Comment guifg=#809080 +hi Todo guifg=#809080 guibg=NONE + +"Invisibles +hi NonText guifg=#665544 +hi SpecialKey guifg=#665544 + +"rubyPseudoVariable +"nil, self, symbols, etc +hi Constant guifg=#7DC1CF + +"rubyClass, rubyModule, rubyDefine +"def, end, include, etc +hi Define guifg=#FFFFB9 gui=bold + +"rubyInterpolation +hi Delimiter guifg=#B8D68F + +"rubyError, rubyInvalidVariable +hi Error guifg=#FFFFFF guibg=#990000 + +"rubyFunction +hi Function guifg=#E84F4F gui=bold + +"rubyIdentifier +"@var, @@var, $var, etc +hi Identifier guifg=#4E9FB1 + +"rubyInclude +"include, autoload, extend, load, require +hi Include guifg=#E1AA5D gui=bold + +"rubyKeyword, rubyKeywordAsMethod +"alias, undef, super, yield, callcc, caller, lambda, proc +hi Keyword guifg=#E1AA5D + +" same as define +hi Macro guifg=#E1AA5D + +"rubyInteger +hi Number guifg=#A0CF5D + +" #if, #else, #endif +hi PreCondit guifg=#E1AA5D + +" generic preprocessor +hi PreProc guifg=#E1AA5D + +"rubyControl, rubyAccess, rubyEval +"case, begin, do, for, if unless, while, until else, etc. +hi Statement guifg=#E1AA5D + +"rubyString +hi String guifg=#A0CF5D + +hi Title guifg=#FFFFFF + +"rubyConstant +hi Type guifg=#E84F4F + +hi DiffAdd guifg=#E6E1DC guibg=#144212 +hi DiffDelete guifg=#E6E1DC guibg=#660000 + +hi link htmlTag xmlTag +hi link htmlTagName xmlTagName +hi link htmlEndTag xmlEndTag + +hi xmlTag guifg=#E8BF6A +hi xmlTagName guifg=#E8BF6A +hi xmlEndTag guifg=#E8BF6A + +" Status line - changes colors depending on insert mode +" Standard +hi User1 guifg=#E8BF6A guibg=#202020 gui=bold +hi User2 guifg=#E84F4F guibg=#202020 gui=bold +hi User3 guifg=#A0CF5D guibg=#202020 gui=bold +hi User4 guifg=#202020 guibg=#E8BF6A gui=bold +hi User5 guifg=#909090 guibg=#202020 +hi User6 guifg=#40352D guibg=#202020 +hi User7 guifg=#202020 guibg=#202020 gui=bold +hi StatusLine guifg=#E6E1DC guibg=#202020 gui=bold +hi StatusLineNC guifg=#606060 guibg=#202020 gui=bold + +function! InsertStatuslineColor(mode) + + if a:mode == 'i' " Insert Mode + hi User4 guifg=#202020 guibg=#7DC1CF + + elseif a:mode == 'r' " Replace Mode + hi User4 guifg=#202020 guibg=#E84F4F + + else + hi User4 guifg=#202020 guibg=#E8BF6A + + endif +endfunction + +" Call function +au InsertEnter * call InsertStatuslineColor(v:insertmode) +au InsertLeave * hi statusline guifg=#E6E1DC guibg=#202020 +au InsertLeave * hi User4 guifg=#202020 guibg=#E8BF6A diff --git a/.vim/colors/predawn.vim b/.vim/colors/predawn.vim new file mode 100644 index 0000000..663cb9f --- /dev/null +++ b/.vim/colors/predawn.vim @@ -0,0 +1,107 @@ +" Vim color file +" Converted from Textmate theme Predawn using Coloration v0.4.0 (http://github.com/sickill/coloration) + +set background=dark +highlight clear + +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "predawn" + +hi Cursor ctermfg=235 ctermbg=209 cterm=NONE guifg=#282828 guibg=#f18260 gui=NONE +hi Visual ctermfg=NONE ctermbg=239 cterm=NONE guifg=NONE guibg=#4c4c4c gui=NONE +hi CursorLine ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3c3c gui=NONE +hi CursorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3c3c gui=NONE +hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE guifg=NONE guibg=#3c3c3c gui=NONE +hi LineNr ctermfg=245 ctermbg=237 cterm=NONE guifg=#8d8d8d guibg=#3c3c3c gui=NONE +hi VertSplit ctermfg=241 ctermbg=241 cterm=NONE guifg=#626262 guibg=#626262 gui=NONE +hi MatchParen ctermfg=215 ctermbg=NONE cterm=underline guifg=#f49d62 guibg=NONE gui=underline +hi StatusLine ctermfg=231 ctermbg=241 cterm=bold guifg=#f1f1f1 guibg=#626262 gui=bold +hi StatusLineNC ctermfg=231 ctermbg=241 cterm=NONE guifg=#f1f1f1 guibg=#626262 gui=NONE +hi Pmenu ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi PmenuSel ctermfg=NONE ctermbg=239 cterm=NONE guifg=NONE guibg=#4c4c4c gui=NONE +hi IncSearch ctermfg=235 ctermbg=152 cterm=NONE guifg=#282828 guibg=#bddcdc gui=NONE +hi Search ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline +hi Directory ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Folded ctermfg=243 ctermbg=235 cterm=NONE guifg=#777777 guibg=#282828 gui=NONE + +hi Normal ctermfg=231 ctermbg=235 cterm=NONE guifg=#f1f1f1 guibg=#282828 gui=NONE +hi Boolean ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Character ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Comment ctermfg=243 ctermbg=NONE cterm=NONE guifg=#777777 guibg=NONE gui=NONE +hi Conditional ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi Constant ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Define ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi DiffAdd ctermfg=231 ctermbg=64 cterm=bold guifg=#f1f1f1 guibg=#46830d gui=bold +hi DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE guifg=#8b0808 guibg=NONE gui=NONE +hi DiffChange ctermfg=231 ctermbg=23 cterm=NONE guifg=#f1f1f1 guibg=#243958 gui=NONE +hi DiffText ctermfg=231 ctermbg=24 cterm=bold guifg=#f1f1f1 guibg=#204a87 gui=bold +hi ErrorMsg ctermfg=167 ctermbg=NONE cterm=NONE guifg=#cf5340 guibg=NONE gui=NONE +hi WarningMsg ctermfg=167 ctermbg=NONE cterm=NONE guifg=#cf5340 guibg=NONE gui=NONE +hi Float ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Function ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi Identifier ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Keyword ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi Label ctermfg=152 ctermbg=NONE cterm=NONE guifg=#bddcdc guibg=NONE gui=NONE +hi NonText ctermfg=209 ctermbg=236 cterm=NONE guifg=#f18260 guibg=#323232 gui=NONE +hi Number ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi Operator ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi PreProc ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi Special ctermfg=231 ctermbg=NONE cterm=NONE guifg=#f1f1f1 guibg=NONE gui=NONE +hi SpecialKey ctermfg=209 ctermbg=237 cterm=NONE guifg=#f18260 guibg=#3c3c3c gui=NONE +hi Statement ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi StorageClass ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi String ctermfg=152 ctermbg=NONE cterm=NONE guifg=#bddcdc guibg=NONE gui=NONE +hi Tag ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi Title ctermfg=231 ctermbg=NONE cterm=bold guifg=#f1f1f1 guibg=NONE gui=bold +hi Todo ctermfg=243 ctermbg=NONE cterm=inverse,bold guifg=#777777 guibg=NONE gui=inverse,bold +hi Type ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline guifg=NONE guibg=NONE gui=underline +hi rubyClass ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyFunction ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi rubyInterpolationDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE +hi rubySymbol ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi rubyConstant ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi rubyStringDelimiter ctermfg=152 ctermbg=NONE cterm=NONE guifg=#bddcdc guibg=NONE gui=NONE +hi rubyBlockParameter ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyInstanceVariable ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyInclude ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyGlobalVariable ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRegexp ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRegexpDelimiter ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyEscape ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi rubyControl ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyClassVariable ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyOperator ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyException ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyPseudoVariable ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRailsUserClass ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi rubyRailsARAssociationMethod ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRailsARMethod ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRailsRenderMethod ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi rubyRailsMethod ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi erubyDelimiter ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE +hi erubyComment ctermfg=243 ctermbg=NONE cterm=NONE guifg=#777777 guibg=NONE gui=NONE +hi erubyRailsMethod ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi htmlTag ctermfg=150 ctermbg=NONE cterm=NONE guifg=#b4d388 guibg=NONE gui=NONE +hi htmlEndTag ctermfg=150 ctermbg=NONE cterm=NONE guifg=#b4d388 guibg=NONE gui=NONE +hi htmlTagName ctermfg=150 ctermbg=NONE cterm=NONE guifg=#b4d388 guibg=NONE gui=NONE +hi htmlArg ctermfg=150 ctermbg=NONE cterm=NONE guifg=#b4d388 guibg=NONE gui=NONE +hi htmlSpecialChar ctermfg=209 ctermbg=NONE cterm=NONE guifg=#f18260 guibg=NONE gui=NONE +hi javaScriptFunction ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi javaScriptRailsFunction ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi javaScriptBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE +hi yamlKey ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi yamlAnchor ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi yamlAlias ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi yamlDocumentHeader ctermfg=152 ctermbg=NONE cterm=NONE guifg=#bddcdc guibg=NONE gui=NONE +hi cssURL ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi cssFunctionName ctermfg=215 ctermbg=NONE cterm=NONE guifg=#f49d62 guibg=NONE gui=NONE +hi cssColor ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi cssPseudoClassId ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi cssClassName ctermfg=109 ctermbg=NONE cterm=NONE guifg=#92bfbf guibg=NONE gui=NONE +hi cssValueLength ctermfg=228 ctermbg=NONE cterm=NONE guifg=#ecec89 guibg=NONE gui=NONE +hi cssCommonAttr ctermfg=150 ctermbg=NONE cterm=NONE guifg=#b4d388 guibg=NONE gui=NONE +hi cssBraces ctermfg=NONE ctermbg=NONE cterm=NONE guifg=NONE guibg=NONE gui=NONE \ No newline at end of file diff --git a/.vim/colors/tropikos.vim b/.vim/colors/tropikos.vim new file mode 100644 index 0000000..b83b453 --- /dev/null +++ b/.vim/colors/tropikos.vim @@ -0,0 +1,123 @@ +" ---------------------------------------------------------------------------- +" Vim tropikos color scheme +" Maintainer: Hugo Pires +" Last Change: 2012 May +" License: Beer Ware +" ---------------------------------------------------------------------------- + +let g:colors_name = "tropikos" + +highlight clear Normal +set background=dark +set linespace=2 + +if exists("syntax_on") + syntax reset +endif + +" Statusbar Highlight +hi User1 ctermbg=235 ctermfg=3 cterm=bold +hi User2 ctermbg=235 ctermfg=1 cterm=bold +hi User3 ctermbg=235 ctermfg=10 cterm=bold +hi User4 ctermbg=244 ctermfg=235 cterm=bold +hi User5 ctermbg=235 ctermfg=243 +hi User6 ctermbg=235 ctermfg=12 +hi User7 ctermbg=235 ctermfg=235 +hi StatusLineNC ctermbg=235 ctermfg=3 +hi StatusLine + +hi Normal cterm=none ctermbg=none ctermfg=145 gui=none guibg=#202020 guifg=#AFAFAF +hi LineNr cterm=none ctermbg=none ctermfg=59 gui=none guibg=#202020 guifg=#5F5F5F +hi StatusLine cterm=none ctermbg=59 ctermfg=15 gui=none guibg=#5F5F5F guifg=#FFFFFF +hi StatusLineNC cterm=none ctermbg=59 ctermfg=15 gui=none guibg=#5F5F5F guifg=#FFFFFF +hi Search cterm=none ctermbg=59 ctermfg=145 gui=none guibg=#5F5F5F guifg=#AFAFAF +hi IncSearch cterm=none ctermbg=113 ctermfg=59 gui=none guibg=#87DF5F guifg=#5F5F5F +hi ColumnMargin cterm=none ctermbg=0 gui=none guibg=#000000 +hi Error cterm=none ctermbg=1 ctermfg=145 gui=none guifg=#AFAFAF +hi ErrorMsg cterm=none ctermbg=1 ctermfg=145 gui=none guifg=#AFAFAF +hi Folded cterm=none ctermbg=59 ctermfg=155 gui=none guibg=#5F5F5F guifg=#AFFF5F +hi FoldColumn cterm=none ctermbg=59 ctermfg=155 gui=none guibg=#5F5F5F guifg=#AFFF5F +hi NonText cterm=bold ctermbg=none ctermfg=59 gui=bold guibg=#303030 guifg=#5F5F5F +hi ModeMsg cterm=bold ctermbg=none ctermfg=10 gui=none +hi Pmenu cterm=none ctermbg=59 ctermfg=145 gui=none guibg=#5F5F5F guifg=#AFAFAF +hi PmenuSel cterm=none ctermbg=145 ctermfg=59 gui=none guibg=#AFAFAF guifg=#5F5F5F +hi PmenuSbar cterm=none ctermbg=145 ctermfg=59 gui=none guibg=#AFAFAF guifg=#5F5F5F +hi SpellBad cterm=none ctermbg=1 ctermfg=145 gui=none guifg=#AFAFAF +hi SpellCap cterm=none ctermbg=4 ctermfg=145 gui=none guifg=#AFAFAF +hi SpellRare cterm=none ctermbg=4 ctermfg=145 gui=none guifg=#AFAFAF +hi SpellLocal cterm=none ctermbg=4 ctermfg=145 gui=none guifg=#AFAFAF +hi Visual cterm=none ctermbg=145 ctermfg=59 gui=none guibg=#AFAFAF guifg=#5F5F5F +hi Directory cterm=none ctermbg=none ctermfg=99 gui=none guibg=#202020 guifg=#87AFFF +hi SpecialKey cterm=none ctermbg=none ctermfg=59 gui=none guifg=#5F5F5F +hi DiffAdd cterm=bold ctermbg=2 ctermfg=15 +hi DiffChange cterm=bold ctermbg=4 ctermfg=15 +hi DiffDelete cterm=bold ctermbg=1 ctermfg=15 +hi DiffText cterm=bold ctermbg=3 ctermfg=8 +hi MatchParen cterm=none ctermbg=59 ctermfg=145 gui=none guibg=#5F5F5F guifg=#AFAFAF +hi CursorLine cterm=none ctermbg=238 ctermfg=none gui=none guibg=#424242 +hi Title cterm=none ctermbg=none ctermfg=139 gui=none guifg=#AF87AF +hi VertSplit ctermfg=235 +" ---------------------------------------------------------------------------- +" Syntax Highlighting +" ---------------------------------------------------------------------------- +hi Keyword cterm=none ctermbg=none ctermfg=167 gui=none guifg=#DF5F5F +hi Comment cterm=none ctermbg=none ctermfg=59 gui=none guifg=#5F5F5F +hi Delimiter cterm=none ctermbg=none ctermfg=145 gui=none guifg=#AFAFAF +hi Identifier cterm=none ctermbg=none ctermfg=139 gui=none guifg=#AF87AF +hi Structure cterm=none ctermbg=none ctermfg=139 gui=none guifg=#AF87AF +hi Ignore cterm=none ctermbg=none ctermfg=59 gui=none guifg=bg +hi Constant cterm=none ctermbg=none ctermfg=139 gui=none guifg=#AF87AF +hi PreProc cterm=none ctermbg=none ctermfg=167 gui=none guifg=#DF5F5F +hi Type cterm=none ctermbg=none ctermfg=139 gui=none guifg=#AF87AF +hi Statement cterm=none ctermbg=none ctermfg=167 gui=none guifg=#DF5F5F +hi Special cterm=none ctermbg=none ctermfg=6 gui=none guifg=#d7d7d7 +hi String cterm=none ctermbg=none ctermfg=107 gui=italic guifg=#87AF5F +hi Number cterm=none ctermbg=none ctermfg=107 gui=none guifg=#87AF5F +hi Underlined cterm=underline ctermfg=139 gui=underline guifg=#AF87AF +hi Symbol cterm=none ctermbg=none ctermfg=180 gui=none guifg=#DFAF87 +hi Method cterm=none ctermbg=none ctermfg=180 gui=none guifg=#DFAF87 +hi Interpolation cterm=none ctermbg=none ctermfg=180 gui=none guifg=#DFAF87 +hi StorageClass cterm=none ctermbg=none ctermfg=180 gui=none guifg=#DFAF87 + +" Python +hi link pythonFunction Method + +" HTML +hi link htmlTag Method +hi link htmlEndTag Method +hi link htmlArg Method +hi link htmlLink Identifier + +" Javascript +hi link javaScriptFunction Keyword +hi link javaScriptNumber Number +hi link javascriptMember Method +hi link javascriptBraces Normal +hi link javascriptNull Method + +" CSS +hi link cssBraces Normal + +" Erlang +hi link erlangAtom Keyword +hi link erlangBitType Keyword + +" Ruby +hi link rubyBeginend Keyword +hi link rubyClass Keyword +hi link rubyModule Keyword +hi link rubyKeyword Keyword +hi link rubyOperator Method +hi link rubyIdentifier Keyword +hi link rubyClassVariable Symbol +hi link rubyInstanceVariable Constant +hi link rubyGlobalVariable Constant +hi link rubyClassVariable Method +hi link rubyConstant Constant +hi link rubySymbol Symbol +hi link rubyFunction Constant +hi link rubyControl Keyword +hi link rubyConditional Keyword +hi link rubyInterpolation Interpolation +hi link rubyInterpolationDelimiter Interpolation +hi link rubyRailsMethod Method diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..e0d16e4 --- /dev/null +++ b/.vimrc @@ -0,0 +1,214 @@ +syntax on + +colorscheme tropikos +set background=dark +set guifont=Fira\ Mono\ 10.5 +set term=rxvt-unicode + +set tabstop=2 +set shiftwidth=2 +set expandtab +set ignorecase +set nocompatible +set number +set nowrap +set nobackup +set nowritebackup +set noswapfile +set autowrite +set mouse=a +set guioptions-=m +set guioptions-=L +set guioptions-=r +set guioptions-=T + + + +nnoremap d :bd +filetype off + + +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif +autocmd InsertLeave * :set relativenumber +autocmd InsertEnter * :set number +"++ VUNDLE ++" +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +Plugin 'gmarik/Vundle.vim' +Plugin 'kien/ctrlp.vim' +Plugin 'scrooloose/nerdtree' +Plugin 'tpope/vim-rails' +Plugin 'chriskempson/base16-vim' +map :NERDTreeToggle + +call vundle#end() " required +filetype plugin indent on " required + + +" Status line {{{ + set laststatus=2 " always show statusline + + " Generic Statusline {{{ + function! SetStatus() + setl statusline+= + \%1*\ %f + \%H%M%R%W%7*\ ┃ + \%2*\ %Y\ <<<\ %{&ff}%7*\ ┃ + endfunction + + function! SetRightStatus() + setl statusline+= + \%5*\ %{StatusFileencoding()}%7*\ ┃ + \%5*\ %{StatusBuffersize()}%7*\ ┃ + \%=%<%7*\ ┃ + \%5*\ %{StatusWrapON()} + \%6*%{StatusWrapOFF()}\ %7*┃ + \%5*\ %{StatusInvisiblesON()} + \%6*%{StatusInvisiblesOFF()}\ %7*┃ + \%5*\ %{StatusExpandtabON()} + \%6*%{StatusExpandtabOFF()}\ %7*┃ + \%5*\ w%{StatusTabstop()}\ %7*┃ + \%3*\ %l,%c\ >>>\ %P + \\ + endfunction " }}} + + " Update when leaving Buffer {{{ + function! SetStatusLeaveBuffer() + setl statusline="" + call SetStatus() + endfunction + au BufLeave * call SetStatusLeaveBuffer() " }}} + + " Update when switching mode {{{ + function! SetStatusInsertMode(mode) + setl statusline=%4* + if a:mode == 'i' + setl statusline+=\ INS\ ◥ + elseif a:mode == 'r' + setl statusline+=\ REP\ ◥ + elseif a:mode == 'normal' + setl statusline+=\ NOR\ ◥ + endif + call SetStatus() + call SetRightStatus() + endfunction + + au VimEnter * call SetStatusInsertMode('normal') + au InsertEnter * call SetStatusInsertMode(v:insertmode) + au InsertLeave * call SetStatusInsertMode('normal') + au BufEnter * call SetStatusInsertMode('normal') " }}} + + + + " Some Functions shamelessly ripped and modified from Cream + "fileencoding (three characters only) {{{ + function! StatusFileencoding() + if &fileencoding == "" + if &encoding != "" + return &encoding + else + return " -- " + endif + else + return &fileencoding + endif + endfunc " }}} + " &expandtab {{{ + function! StatusExpandtabON() + if &expandtab == 0 + return "tabs" + else + return "" + endif + endfunction " + function! StatusExpandtabOFF() + if &expandtab == 0 + return "" + else + return "tabs" + endif + endfunction " }}} + " tabstop and softtabstop {{{ + function! StatusTabstop() + + " show by Vim option, not Cream global (modelines) + let str = "" . &tabstop + " show softtabstop or shiftwidth if not equal tabstop + if (&softtabstop && (&softtabstop != &tabstop)) + \ || (&shiftwidth && (&shiftwidth != &tabstop)) + if &softtabstop + let str = str . ":sts" . &softtabstop + endif + if &shiftwidth != &tabstop + let str = str . ":sw" . &shiftwidth + endif + endif + return str + + endfunction " }}} + " Buffer Size {{{ + function! StatusBuffersize() + let bufsize = line2byte(line("$") + 1) - 1 + " prevent negative numbers (non-existant buffers) + if bufsize < 0 + let bufsize = 0 + endif + " add commas + let remain = bufsize + let bufsize = "" + while strlen(remain) > 3 + let bufsize = "," . strpart(remain, strlen(remain) - 3) . bufsize + let remain = strpart(remain, 0, strlen(remain) - 3) + endwhile + let bufsize = remain . bufsize + " too bad we can't use "¿" (nr2char(1068)) :) + let char = "b" + return bufsize . char + endfunction " }}} + " Show Invisibles {{{ + function! StatusInvisiblesON() + "if exists("g:LIST") && g:LIST == 1 + if &list + if &encoding == "latin1" + return "¶" + elseif &encoding == "utf-8" + return "¶" + else + return "$" + endif + else + return "" + endif + endfunction + function! StatusInvisiblesOFF() + "if exists("g:LIST") && g:LIST == 1 + if &list + return "" + else + if &encoding == "latin1" + return "¶" + elseif &encoding == "utf-8" + return "¶" + else + return "$" + endif + endif + endfunction " }}} + " Wrap Enabled {{{ + function! StatusWrapON() + if &wrap + return "wrap" + else + return "" + endif + endfunction + function! StatusWrapOFF() + if &wrap + return "" + else + return "wrap" + endif + endfunction + " }}} +" }}}