Initial Commit
This commit is contained in:
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
|
292
vim/colors/eldar.vim
Normal file
292
vim/colors/eldar.vim
Normal file
@ -0,0 +1,292 @@
|
||||
" ---------------------------------------------------------
|
||||
" ______ _ _
|
||||
" | ____| | | |
|
||||
" | |__ | | __| | __ _ _ __
|
||||
" | __| | |/ _` |/ _` | '__|
|
||||
" | |____| | (_| | (_| | |
|
||||
" |______|_|\__,_|\__,_|_|
|
||||
"
|
||||
" ---------------------------------------------------------
|
||||
"
|
||||
" Maintainer: Alexander Gude
|
||||
" Email: alex.public.account@gmail.com
|
||||
" File: eldar.vim
|
||||
" URL: github.com/agude/vim-eldar
|
||||
" License: MIT
|
||||
"
|
||||
" ---------------------------------------------------------
|
||||
"
|
||||
" Copyright (c) 2016 Alexander Gude
|
||||
"
|
||||
" 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.
|
||||
"
|
||||
" ---------------------------------------------------------
|
||||
|
||||
" Eldar is designed for dark backgrounds
|
||||
set background=dark
|
||||
|
||||
highlight clear
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = 'eldar'
|
||||
|
||||
" Define colors (Tango is the default)
|
||||
" GUI colors
|
||||
let s:red = get(g:, 'eldar_red', '#EF2929')
|
||||
let s:yellow = get(g:, 'eldar_yellow', '#FCE94F')
|
||||
let s:green = get(g:, 'eldar_green', '#8AE234')
|
||||
let s:cyan = get(g:, 'eldar_cyan', '#34E2E2')
|
||||
let s:blue = get(g:, 'eldar_blue', '#729FCF')
|
||||
let s:magenta = get(g:, 'eldar_magenta', '#AD7FA8')
|
||||
let s:gui_text = get(g:, 'eldar_text', 'White')
|
||||
let s:gui_bg = get(g:, 'eldar_background', 'Black')
|
||||
|
||||
" Terminal colors
|
||||
let s:term_text = get(g:, 'eldar_term_text', 'NONE')
|
||||
let s:term_bg = get(g:, 'eldar_term_background', 'NONE')
|
||||
|
||||
" The ColourAssignment map and function to unpack it are from the bandit
|
||||
" colorscheme by Al Bunden, available here:
|
||||
" http://www.cgtk.co.uk/vim-scripts/bandit
|
||||
|
||||
let s:ColourAssignment = {}
|
||||
|
||||
" Unspecified colours default to NONE, EXCEPT cterm(.*) which default to matching gui(.*)
|
||||
"
|
||||
" In most cases, only GUIFG is therefore important unless support for Black and White
|
||||
" terminals is essential
|
||||
|
||||
" Editor settings
|
||||
" ---------------
|
||||
let s:ColourAssignment['Normal'] = {'GUIFG': s:gui_text, 'GUIBG': s:gui_bg, 'CTERMBG': s:term_bg, 'CTERMFG': s:term_text}
|
||||
let s:ColourAssignment['Cursor'] = {'GUI': 'Reverse'}
|
||||
let s:ColourAssignment['CursorLine'] = {'GUI': 'NONE', 'GUIBG': 'Black'}
|
||||
let s:ColourAssignment['LineNr'] = {'GUIFG': 'DarkGray'}
|
||||
let s:ColourAssignment['CursorLineNr'] = {'GUIFG': 'White'}
|
||||
|
||||
|
||||
" Number column
|
||||
" -------------
|
||||
let s:ColourAssignment['CursorColumn'] = {'GUIBG': 'DarkGrey'}
|
||||
let s:ColourAssignment['Folded'] = {'GUIFG': 'Cyan', 'GUIBG': 'DarkGrey'}
|
||||
let s:ColourAssignment['FoldColumn'] = {'GUIBG': 'DarkGrey'}
|
||||
highlight! link SignColumn FoldColumn
|
||||
|
||||
|
||||
" Window/Tab delimiters
|
||||
" ---------------------
|
||||
let s:ColourAssignment['VertSplit'] = {'GUIFG': 'White', 'GUIBG': 'NONE'}
|
||||
let s:ColourAssignment['ColorColumn'] = {'GUIBG': 'DarkGray'}
|
||||
let s:ColourAssignment['TabLine'] = {'GUIFG': 'White', 'GUIBG': 'DarkGray'}
|
||||
let s:ColourAssignment['TabLineFill'] = {'GUIBG': 'DarkGray'}
|
||||
let s:ColourAssignment['TabLineSel'] = {'GUIFG': 'Black', 'GUIBG': 'Gray'}
|
||||
|
||||
|
||||
" File Navigation / Searching
|
||||
" ---------------------------
|
||||
let s:ColourAssignment['Directory'] = {'GUIFG': s:blue, 'CTERMFG': 'Blue', 'GUI': 'Bold'}
|
||||
let s:ColourAssignment['Search'] = {'GUIFG': 'Black', 'GUIBG': s:yellow, 'CTERMFG': 'yellow', 'CTERMBG': 'black', 'GUI': 'Bold', 'CTERM': 'Reverse,Bold'}
|
||||
let s:ColourAssignment['IncSearch'] = {'GUI': 'Reverse'}
|
||||
|
||||
|
||||
" Prompt/Status
|
||||
" -------------
|
||||
let s:ColourAssignment['StatusLine'] = {'GUIFG': 'White', 'GUIBG': s:gui_bg, 'GUI': 'Bold,Reverse', 'CTERMFG': 'White', 'CTERMBG': s:term_bg}
|
||||
let s:ColourAssignment['StatusLineNC'] = {'GUIFG': 'White', 'GUIBG': s:gui_bg, 'GUI': 'Reverse', 'CTERMFG': 'White', 'CTERMBG': s:term_bg}
|
||||
let s:ColourAssignment['WildMenu'] = {'GUIFG': 'White', 'GUIBG': 'DarkGrey', 'GUI': 'Bold'}
|
||||
let s:ColourAssignment['Question'] = {'GUIFG': s:blue, 'CTERMFG': 'Blue'}
|
||||
let s:ColourAssignment['Title'] = {'GUI': 'Bold'}
|
||||
let s:ColourAssignment['ModeMsg'] = {'GUI': 'Bold'}
|
||||
let s:ColourAssignment['MoreMsg'] = {'GUIFG': s:green, 'CTERMFG': 'Green'}
|
||||
|
||||
|
||||
" Visual aid
|
||||
" ----------
|
||||
let s:ColourAssignment['MatchParen'] = {'GUIBG': s:cyan, 'CTERMBG': 'cyan'}
|
||||
let s:ColourAssignment['Visual'] = {'GUIBG': 'DarkGrey'}
|
||||
highlight! link VisualNOS Visual
|
||||
let s:ColourAssignment['NonText'] = {'GUIFG': s:blue, 'CTERMFG': 'blue'}
|
||||
|
||||
let s:ColourAssignment['Todo'] = {'GUIFG': 'Black', 'GUIBG': s:yellow, 'CTERMBG': 'yellow'}
|
||||
let s:ColourAssignment['Underlined'] = {'GUIFG': s:cyan, 'CTERMFG': 'cyan', 'GUI': 'Underline'}
|
||||
let s:ColourAssignment['Error'] = {'GUIFG': s:red, 'GUIBG': 'Black', 'CTERMFG': 'red', 'GUI': 'Reverse,Bold'}
|
||||
let s:ColourAssignment['ErrorMsg'] = {'GUIFG': s:red, 'GUIBG': 'White', 'CTERMFG': 'red', 'GUI': 'Reverse,Bold'}
|
||||
let s:ColourAssignment['WarningMsg'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
|
||||
let s:ColourAssignment['Ignore'] = {'GUIFG': 'bg', 'CTERMFG': 'Black'}
|
||||
let s:ColourAssignment['SpecialKey'] = {'GUIFG': s:cyan, 'CTERMFG': 'Cyan'}
|
||||
|
||||
|
||||
" Variable types
|
||||
" --------------
|
||||
let s:ColourAssignment['Constant'] = {'GUIFG': s:magenta, 'CTERMFG': 'magenta'}
|
||||
let s:ColourAssignment['Number'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
|
||||
highlight! link String Constant
|
||||
highlight! link Boolean Constant
|
||||
highlight! link Float Number
|
||||
|
||||
let s:ColourAssignment['Identifier'] = {'GUIFG': s:green, 'CTERMFG': 'green', 'GUI': 'Bold'}
|
||||
highlight! link Function Identifier
|
||||
|
||||
|
||||
" Comments
|
||||
" --------
|
||||
let s:ColourAssignment['Comment'] = {'GUIFG': s:cyan, 'CTERMFG': 'cyan'}
|
||||
highlight! link SpecialComment Special
|
||||
|
||||
|
||||
" Language constructs
|
||||
" -------------------
|
||||
let s:ColourAssignment['Statement'] = {'GUIFG': s:yellow, 'CTERMFG': 'yellow', 'GUI': 'Bold'}
|
||||
highlight! link Conditional Statement
|
||||
highlight! link Repeat Statement
|
||||
highlight! link Label Statement
|
||||
highlight! link Operator Statement
|
||||
highlight! link Keyword Statement
|
||||
highlight! link Exception Statement
|
||||
|
||||
let s:ColourAssignment['Special'] = {'GUIFG': s:red, 'CTERMFG': 'red'}
|
||||
highlight! link SpecialChar Special
|
||||
highlight! link Tag Special
|
||||
highlight! link Delimiter Special
|
||||
highlight! link Debug Special
|
||||
|
||||
|
||||
" C like
|
||||
" ------
|
||||
let s:ColourAssignment['PreProc'] = {'GUIFG': s:blue, 'CTERMFG': 'blue', 'GUI': 'Bold'}
|
||||
highlight! link Include PreProc
|
||||
highlight! link Define PreProc
|
||||
highlight! link Macro PreProc
|
||||
highlight! link PreCondit PreProc
|
||||
|
||||
let s:ColourAssignment['Type'] = {'GUIFG': s:green, 'CTERMFG': 'green', 'GUI': 'Bold'}
|
||||
let s:ColourAssignment['Structure'] = {'GUIFG': s:magenta, 'CTERMFG': 'magenta'}
|
||||
highlight! link StorageClass Type
|
||||
highlight! link Typedef Type
|
||||
|
||||
|
||||
" Diff
|
||||
" ----
|
||||
let s:ColourAssignment['DiffAdd'] = {'GUIFG': s:green, 'GUIBG': 'Black', 'CTERMFG': 'Green', 'GUI': 'Reverse,Bold'}
|
||||
let s:ColourAssignment['DiffChange'] = {'GUIFG': 'NONE'}
|
||||
let s:ColourAssignment['DiffDelete'] = {'GUIFG': s:red, 'GUIBG': 'Black', 'CTERMFG': 'Red', 'GUI': 'Reverse,Bold'}
|
||||
let s:ColourAssignment['DiffText'] = {'GUIFG': s:blue, 'GUIBG': 'Black', 'CTERMFG': 'Blue', 'GUI': 'Reverse,Bold'}
|
||||
|
||||
|
||||
" Completion menu
|
||||
" ---------------
|
||||
let s:ColourAssignment['Pmenu'] = {'GUIFG': 'Black', 'GUIBG': 'Grey'}
|
||||
let s:ColourAssignment['PmenuSel'] = {'GUIFG': s:yellow, 'GUIBG': 'DarkGrey', 'GUI': 'Bold', 'CTERMFG': 'yellow'}
|
||||
let s:ColourAssignment['PmenuThumb'] = {'GUIBG': 'DarkGrey'}
|
||||
highlight! link PmenuSbar Pmenu
|
||||
|
||||
|
||||
" Spelling
|
||||
" --------
|
||||
let s:ColourAssignment['SpellBad'] = {'GUIFG': 'NONE', 'GUISP': s:red, 'CTERMFG': 'red', 'GUI': 'undercurl'}
|
||||
let s:ColourAssignment['SpellCap'] = {'GUIFG': 'NONE', 'GUISP': s:blue, 'CTERMFG': 'blue', 'GUI': 'undercurl'}
|
||||
let s:ColourAssignment['SpellLocal'] = {'GUIFG': 'NONE', 'GUISP': s:yellow, 'CTERMFG': 'yellow', 'GUI': 'undercurl'}
|
||||
let s:ColourAssignment['SpellRare'] = {'GUIFG': 'NONE', 'GUISP': s:green, 'CTERMFG': 'green', 'GUI': 'undercurl'}
|
||||
|
||||
|
||||
" Text Formatting
|
||||
" ---------------
|
||||
let s:ColourAssignment['Italic'] = {'GUIFG': 'White', 'GUI': 'Italic'}
|
||||
let s:ColourAssignment['Bold'] = {'GUIFG': 'White', 'GUI': 'Bold'}
|
||||
let s:ColourAssignment['BoldItalic'] = {'GUIFG': 'White', 'GUI': 'Italic,Bold'}
|
||||
highlight! link htmlItalic Italic
|
||||
highlight! link htmlBold Bold
|
||||
highlight! link htmlBoldItalic BoldItalic
|
||||
|
||||
|
||||
" Function to translate the ColourAssignments to highlight lines
|
||||
let s:colours = {}
|
||||
let s:valid_cterm_colours =
|
||||
\ [
|
||||
\ 'Black', 'DarkBlue', 'DarkGreen', 'DarkCyan',
|
||||
\ 'DarkRed', 'DarkMagenta', 'Brown', 'DarkYellow',
|
||||
\ 'LightGray', 'LightGrey', 'Gray', 'Grey',
|
||||
\ 'DarkGray', 'DarkGrey', 'Blue', 'LightBlue',
|
||||
\ 'Green', 'LightGreen', 'Cyan', 'LightCyan',
|
||||
\ 'Red', 'LightRed', 'Magenta', 'LightMagenta',
|
||||
\ 'Yellow', 'LightYellow', 'White',
|
||||
\ ]
|
||||
|
||||
for s:key in keys(s:ColourAssignment)
|
||||
let s:colours = s:ColourAssignment[s:key]
|
||||
if has_key(s:colours, 'TERM')
|
||||
let s:term = s:colours['TERM']
|
||||
else
|
||||
let s:term = 'NONE'
|
||||
endif
|
||||
if has_key(s:colours, 'GUI')
|
||||
let s:gui = s:colours['GUI']
|
||||
else
|
||||
let s:gui = 'NONE'
|
||||
endif
|
||||
if has_key(s:colours, 'GUIFG')
|
||||
let s:guifg = s:colours['GUIFG']
|
||||
else
|
||||
let s:guifg = 'NONE'
|
||||
endif
|
||||
if has_key(s:colours, 'GUIBG')
|
||||
let s:guibg = s:colours['GUIBG']
|
||||
else
|
||||
let s:guibg = 'NONE'
|
||||
endif
|
||||
if has_key(s:colours, 'CTERM')
|
||||
let s:cterm = s:colours['CTERM']
|
||||
else
|
||||
let s:cterm = s:gui
|
||||
endif
|
||||
if has_key(s:colours, 'CTERMFG')
|
||||
let s:ctermfg = s:colours['CTERMFG']
|
||||
else
|
||||
if index(s:valid_cterm_colours, s:guifg) != -1
|
||||
let s:ctermfg = s:guifg
|
||||
else
|
||||
let s:ctermfg = 'NONE'
|
||||
endif
|
||||
endif
|
||||
if has_key(s:colours, 'CTERMBG')
|
||||
let s:ctermbg = s:colours['CTERMBG']
|
||||
else
|
||||
if index(s:valid_cterm_colours, s:guibg) != -1
|
||||
let s:ctermbg = s:guibg
|
||||
else
|
||||
let s:ctermbg = 'NONE'
|
||||
endif
|
||||
endif
|
||||
if has_key(s:colours, 'GUISP')
|
||||
let s:guisp = s:colours['GUISP']
|
||||
else
|
||||
let s:guisp = 'NONE'
|
||||
endif
|
||||
|
||||
if s:key =~# '^\k*$'
|
||||
execute 'highlight '.s:key.' term='.s:term.' cterm='.s:cterm.' gui='.s:gui.' ctermfg='.s:ctermfg.' guifg='.s:guifg.' ctermbg='.s:ctermbg.' guibg='.s:guibg.' guisp='.s:guisp
|
||||
endif
|
||||
endfor
|
307
vim/colors/wombat256i.vim
Normal file
307
vim/colors/wombat256i.vim
Normal file
@ -0,0 +1,307 @@
|
||||
" Vim color file
|
||||
" Maintainer: David Liang (bmdavll at gmail dot com)
|
||||
" Last Change: November 28 2008
|
||||
"
|
||||
" wombat256.vim - a modified version of Wombat by Lars Nielsen that also
|
||||
" works on xterms with 88 or 256 colors. The algorithm for approximating the
|
||||
" GUI colors with the xterm palette is from desert256.vim by Henry So Jr.
|
||||
|
||||
" Minor changes by Daniel Solstad (http://dsolstad.com)
|
||||
" - Changed the static background color to terminal default, which makes it transparent (if your terminal is)
|
||||
" - Changed colors of line numbering
|
||||
" - Changed non text to nothing. Keeping space you havn't written on yet the same as the rest, and not hard black.
|
||||
|
||||
|
||||
set background=dark
|
||||
|
||||
if version > 580
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
|
||||
let g:colors_name = "wombat256i"
|
||||
|
||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||
finish
|
||||
endif
|
||||
|
||||
" functions {{{
|
||||
" 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_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 <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 color level for the given color 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 color indices
|
||||
fun <SID>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 <SID>color(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 color
|
||||
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_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(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>color(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 != ""
|
||||
if a:attr == 'italic'
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=none"
|
||||
else
|
||||
exec "hi ".a:group." gui=".a:attr." cterm=".a:attr
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
" }}}
|
||||
|
||||
call <SID>X("Normal", "cccccc", "", "none")
|
||||
call <SID>X("Cursor", "222222", "ecee90", "none")
|
||||
call <SID>X("CursorLine", "", "32322e", "none")
|
||||
call <SID>X("CursorColumn", "", "2d2d2d", "")
|
||||
"CursorIM
|
||||
"Question
|
||||
"IncSearch
|
||||
call <SID>X("Search", "444444", "af87d7", "")
|
||||
call <SID>X("MatchParen", "ecee90", "857b6f", "bold")
|
||||
call <SID>X("SpecialKey", "6c6c6c", "", "none")
|
||||
call <SID>X("Visual", "ecee90", "597418", "none")
|
||||
call <SID>X("LineNr", "FFFFFF", "242424", "none")
|
||||
call <SID>X("Folded", "a0a8b0", "404048", "none")
|
||||
call <SID>X("Title", "f6f3e8", "", "bold")
|
||||
call <SID>X("VertSplit", "444444", "444444", "none")
|
||||
call <SID>X("StatusLine", "f6f3e8", "444444", "italic")
|
||||
call <SID>X("StatusLineNC", "857b6f", "444444", "none")
|
||||
"Scrollbar
|
||||
"Tooltip
|
||||
"Menu
|
||||
"WildMenu
|
||||
call <SID>X("Pmenu", "f6f3e8", "444444", "")
|
||||
call <SID>X("PmenuSel", "121212", "caeb82", "")
|
||||
call <SID>X("WarningMsg", "ff0000", "", "")
|
||||
"ErrorMsg
|
||||
"ModeMsg
|
||||
"MoreMsg
|
||||
"Directory
|
||||
"DiffAdd
|
||||
"DiffChange
|
||||
"DiffDelete
|
||||
"DiffText
|
||||
|
||||
" syntax highlighting
|
||||
call <SID>X("Number", "e5786d", "", "none")
|
||||
call <SID>X("Constant", "e5786d", "", "none")
|
||||
call <SID>X("String", "95e454", "", "italic")
|
||||
call <SID>X("Comment", "c0bc6c", "", "italic")
|
||||
call <SID>X("Identifier", "caeb82", "", "none")
|
||||
call <SID>X("Keyword", "87afff", "", "none")
|
||||
call <SID>X("Statement", "87afff", "", "none")
|
||||
call <SID>X("Function", "caeb82", "", "none")
|
||||
call <SID>X("PreProc", "e5786d", "", "none")
|
||||
call <SID>X("Type", "caeb82", "", "none")
|
||||
call <SID>X("Special", "ffdead", "", "none")
|
||||
call <SID>X("Todo", "857b6f", "", "italic")
|
||||
"Underlined
|
||||
"Error
|
||||
"Ignore
|
||||
|
||||
hi! link VisualNOS Visual
|
||||
hi! link FoldColumn Folded
|
||||
|
||||
" delete functions {{{
|
||||
delf <SID>X
|
||||
delf <SID>rgb
|
||||
delf <SID>color
|
||||
delf <SID>rgb_color
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_color
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
" }}}
|
||||
|
||||
" vim:set ts=4 sw=4 noet fdm=marker:
|
467
vim/colors/zenburn.vim
Normal file
467
vim/colors/zenburn.vim
Normal file
@ -0,0 +1,467 @@
|
||||
" Vim color file
|
||||
" Maintainer: Jani Nurminen <slinky@iki.fi>
|
||||
" URL: http://kippura.org/zenburnpage/
|
||||
" License: GNU GPL <http://www.gnu.org/licenses/gpl.html>
|
||||
"
|
||||
" Nothing too fancy, just some alien fruit salad to keep you in the zone.
|
||||
" This syntax file was designed to be used with dark environments and
|
||||
" low light situations. Of course, if it works during a daybright office, go
|
||||
" ahead :)
|
||||
"
|
||||
" Owes heavily to other Vim color files! With special mentions
|
||||
" to "BlackDust", "Camo" and "Desert".
|
||||
"
|
||||
" To install, copy to ~/.vim/colors directory.
|
||||
"
|
||||
" Alternatively, you can use Vimball installation:
|
||||
" vim zenburn.vba
|
||||
" :so %
|
||||
" :q
|
||||
"
|
||||
" For details, see :help vimball
|
||||
"
|
||||
" After installation, use it with :colorscheme zenburn.
|
||||
" See also :help syntax
|
||||
"
|
||||
" Credits:
|
||||
" - Jani Nurminen - original Zenburn, maintainer
|
||||
" - Steve Hall & Cream posse - higher-contrast Visual selection
|
||||
" - Kurt Maier - 256 color console coloring, low and high contrast toggle,
|
||||
" bug fixing
|
||||
" - Charlie - spotted too bright StatusLine in non-high contrast mode
|
||||
" - Pablo Castellazzi - CursorLine fix for 256 color mode
|
||||
" - Tim Smith - force dark background
|
||||
" - John Gabriele - spotted bad Ignore-group handling
|
||||
" - Zac Thompson - spotted invisible NonText in low contrast mode
|
||||
" - Christophe-Marie Duquesne - suggested making a Vimball,
|
||||
" suggested support for ctags_highlighting.vim
|
||||
" - Andrew Wagner - noted the CursorColumn bug (guifg was unintentionally set),
|
||||
" unify CursorColumn colour
|
||||
" - Martin Langasek - clarify the license, whitespace fixes
|
||||
" - Marcin Szamotulski - support autocomplete for Zenburn configuration
|
||||
" parameters
|
||||
" - Clayton Parker (claytron) - Convinced by Kurt Maier to use Zenburn. Point
|
||||
" out issues with LineNr, fix directory styles, and their usage in MacVim.
|
||||
" - Paweł Piekarski - Spotted bad FoldColumn and TabLine. Made better
|
||||
" FoldColumn colors, fixed TabLine colors.
|
||||
" - Jim - Fix for missing Include group for terminal
|
||||
" - Peter (Sakartu) - ColorColumn fixes
|
||||
" - Please see git log for the others not listed here
|
||||
"
|
||||
" CONFIGURABLE PARAMETERS:
|
||||
"
|
||||
" You can use the default (don't set any parameters), or you can
|
||||
" set some parameters to tweak the Zenburn colours.
|
||||
"
|
||||
" To use them, put them into your .vimrc file before loading the color scheme,
|
||||
" example:
|
||||
" let g:zenburn_high_Contrast=1
|
||||
" colors zenburn
|
||||
"
|
||||
" You can also do ":let g:zenburn" then hit Ctrl-d or Tab to scroll through the
|
||||
" list of configurable parameters.
|
||||
"
|
||||
" * You can now set a darker background for bright environments. To activate, use:
|
||||
" let g:zenburn_high_Contrast = 1
|
||||
"
|
||||
" * For transparent terminals set the background to black with:
|
||||
" let g:zenburn_transparent = 1
|
||||
"
|
||||
" * For example, Vim help files uses the Ignore-group for the pipes in tags
|
||||
" like "|somelink.txt|". By default, the pipes are not visible, as they
|
||||
" map to Ignore group. If you wish to enable coloring of the Ignore group,
|
||||
" set the following parameter to 1. Warning, it might make some syntax files
|
||||
" look strange.
|
||||
"
|
||||
" let g:zenburn_color_also_Ignore = 1
|
||||
"
|
||||
" * To get more contrast to the Visual selection, use
|
||||
"
|
||||
" let g:zenburn_alternate_Visual = 1
|
||||
"
|
||||
" Note: this is enabled only if the old-style Visual
|
||||
" if used, see g:zenburn_old_Visual
|
||||
"
|
||||
" * To use alternate colouring for Error message, use
|
||||
"
|
||||
" let g:zenburn_alternate_Error = 1
|
||||
"
|
||||
" * The new default for Include is a duller orange. To use the original
|
||||
" colouring for Include, use
|
||||
"
|
||||
" let g:zenburn_alternate_Include = 1
|
||||
"
|
||||
" * To disable underlining for Labels, use
|
||||
"
|
||||
" let g:zenburn_disable_Label_underline = 1
|
||||
"
|
||||
" * Work-around to a Vim bug, it seems to misinterpret ctermfg and 234 and 237
|
||||
" as light values, and sets background to light for some people. If you have
|
||||
" this problem, use:
|
||||
"
|
||||
" let g:zenburn_force_dark_Background = 1
|
||||
"
|
||||
" * By default the CursorColumn is of a lighter colour. I find it more readable
|
||||
" that way, but some people may want to align it with the darker CursorLine
|
||||
" color, for visual uniformity. To do so, use:
|
||||
"
|
||||
" let g:zenburn_unified_CursorColumn = 1
|
||||
"
|
||||
" Note: you can ignore this unless you use
|
||||
" ":set cursorline cursorcolumn", since otherwise the effect won't be
|
||||
" seen.
|
||||
"
|
||||
" * New (dark) Visual coloring has been introduced.
|
||||
" The dark Visual is more aligned with the rest of the colour scheme,
|
||||
" especially if you use line numbers. If you wish to use the
|
||||
" old Visual coloring, use
|
||||
"
|
||||
" let g:zenburn_old_Visual = 1
|
||||
"
|
||||
" Default is to use the new Visual.
|
||||
"
|
||||
" * EXPERIMENTAL FEATURE: Zenburn would like to support TagHighlight
|
||||
" (an evolved ctags-highlighter) by Al Budden (homepage:
|
||||
" http://www.cgtk.co.uk/vim-scripts/taghighlight).
|
||||
" Current support status is broken: there is no automatic detection of
|
||||
" TagHighlight, no specific language support; however there is some basic
|
||||
" support for Python. If you are a user of TagHighlight and want to help,
|
||||
" please enable:
|
||||
"
|
||||
" let g:zenburn_enable_TagHighlight=1
|
||||
"
|
||||
" and improve the corresponding block at the end of the file.
|
||||
"
|
||||
" NOTE:
|
||||
"
|
||||
" * To turn the parameter(s) back to defaults, use UNLET or set them to 0:
|
||||
"
|
||||
" unlet g:zenburn_alternate_Include
|
||||
" or
|
||||
" let g:zenburn_alternate_Include = 0
|
||||
"
|
||||
"
|
||||
" That's it, enjoy!
|
||||
"
|
||||
" TODO
|
||||
" - Visual alternate color is broken? Try GVim >= 7.0.66 if you have trouble
|
||||
" - IME colouring (CursorIM)
|
||||
|
||||
" Finish if we are in a term lacking 256 color support
|
||||
if ! has("gui_running") && &t_Co <= 255
|
||||
finish
|
||||
endif
|
||||
|
||||
" Set defaults, but keep any parameters already set by the user
|
||||
if ! exists("g:zenburn_high_Contrast")
|
||||
let g:zenburn_high_Contrast = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_transparent")
|
||||
let g:zenburn_transparent = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_color_also_Ignore")
|
||||
let g:zenburn_color_also_Ignore = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_alternate_Error")
|
||||
let g:zenburn_alternate_Error = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_force_dark_Background")
|
||||
let g:zenburn_force_dark_Background = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_alternate_Visual")
|
||||
let g:zenburn_alternate_Visual = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_alternate_Include")
|
||||
let g:zenburn_alternate_Include = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_disable_Label_underline")
|
||||
let g:zenburn_disable_Label_underline = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_unified_CursorColumn")
|
||||
let g:zenburn_unified_CursorColumn = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_old_Visual")
|
||||
let g:zenburn_old_Visual = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:zenburn_enable_TagHighlight")
|
||||
let g:zenburn_enable_TagHighlight = 0
|
||||
endif
|
||||
|
||||
" -----------------------------------------------
|
||||
|
||||
set background=dark
|
||||
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name="zenburn"
|
||||
|
||||
hi Boolean guifg=#dca3a3 ctermfg=181
|
||||
hi Character guifg=#dca3a3 gui=bold ctermfg=181 cterm=bold
|
||||
hi Comment guifg=#7f9f7f gui=italic ctermfg=108
|
||||
hi Conditional guifg=#f0dfaf gui=bold ctermfg=223 cterm=bold
|
||||
hi Constant guifg=#dca3a3 gui=bold ctermfg=181 cterm=bold
|
||||
hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold ctermfg=233 ctermbg=109 cterm=bold
|
||||
hi Debug guifg=#bca3a3 gui=bold ctermfg=181 cterm=bold
|
||||
hi Define guifg=#ffcfaf gui=bold ctermfg=223 cterm=bold
|
||||
hi Delimiter guifg=#8f8f8f ctermfg=245
|
||||
hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold ctermfg=66 ctermbg=237 cterm=bold
|
||||
hi DiffChange guibg=#333333 ctermbg=236
|
||||
hi DiffDelete guifg=#333333 guibg=#464646 ctermfg=236 ctermbg=238
|
||||
hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold ctermfg=217 ctermbg=237 cterm=bold
|
||||
hi Directory guifg=#9fafaf gui=bold ctermfg=109 cterm=bold
|
||||
hi ErrorMsg guifg=#80d4aa guibg=#2f2f2f gui=bold ctermfg=115 ctermbg=236 cterm=bold
|
||||
hi Exception guifg=#c3bf9f gui=bold ctermfg=249 cterm=bold
|
||||
hi Float guifg=#c0bed1 ctermfg=251
|
||||
hi FoldColumn guifg=#93b3a3 guibg=#3f4040
|
||||
hi Folded guifg=#93b3a3 guibg=#3f4040
|
||||
hi Function guifg=#efef8f ctermfg=228
|
||||
hi Identifier guifg=#efdcbc ctermfg=223 cterm=none
|
||||
hi IncSearch guifg=#f8f893 guibg=#385f38 ctermfg=228 ctermbg=23
|
||||
hi Keyword guifg=#f0dfaf gui=bold ctermfg=223 cterm=bold
|
||||
hi Macro guifg=#ffcfaf gui=bold ctermfg=223 cterm=bold
|
||||
hi ModeMsg guifg=#ffcfaf gui=none ctermfg=223 cterm=none
|
||||
hi MoreMsg guifg=#ffffff gui=bold ctermfg=231 cterm=bold
|
||||
hi Number guifg=#8cd0d3 ctermfg=116
|
||||
hi Operator guifg=#f0efd0 ctermfg=230
|
||||
hi PmenuSbar guibg=#2e3330 guifg=#000000 ctermfg=16 ctermbg=236
|
||||
hi PmenuThumb guibg=#a0afa0 guifg=#040404 ctermfg=232 ctermbg=151
|
||||
hi PreCondit guifg=#dfaf8f gui=bold ctermfg=180 cterm=bold
|
||||
hi PreProc guifg=#ffcfaf gui=bold ctermfg=223 cterm=bold
|
||||
hi Question guifg=#ffffff gui=bold ctermfg=231 cterm=bold
|
||||
hi Repeat guifg=#ffd7a7 gui=bold ctermfg=223 cterm=bold
|
||||
hi Search guifg=#ffffe0 guibg=#284f28 ctermfg=230 ctermbg=22
|
||||
hi SignColumn guifg=#9fafaf gui=bold ctermfg=109 cterm=bold
|
||||
hi SpecialChar guifg=#dca3a3 gui=bold ctermfg=181 cterm=bold
|
||||
hi SpecialComment guifg=#82a282 gui=bold ctermfg=108 cterm=bold
|
||||
hi Special guifg=#cfbfaf ctermfg=181
|
||||
hi SpecialKey guifg=#9ece9e ctermfg=151
|
||||
hi Statement guifg=#e3ceab gui=none ctermfg=187 cterm=none
|
||||
hi StatusLine guifg=#313633 guibg=#ccdc90 ctermfg=236 ctermbg=186
|
||||
hi StatusLineNC guifg=#2e3330 guibg=#88b090 ctermfg=235 ctermbg=108
|
||||
hi StorageClass guifg=#c3bf9f gui=bold ctermfg=249 cterm=bold
|
||||
hi String guifg=#cc9393 ctermfg=174
|
||||
hi Structure guifg=#efefaf gui=bold ctermfg=229 cterm=bold
|
||||
hi Tag guifg=#e89393 gui=bold ctermfg=181 cterm=bold
|
||||
hi Title guifg=#efefef gui=bold ctermfg=255 ctermbg=NONE cterm=bold
|
||||
hi Todo guifg=#dfdfdf guibg=NONE gui=bold ctermfg=254 ctermbg=NONE cterm=bold
|
||||
hi Typedef guifg=#dfe4cf gui=bold ctermfg=253 cterm=bold
|
||||
hi Type guifg=#dfdfbf gui=bold ctermfg=187 cterm=bold
|
||||
hi Underlined guifg=#dcdccc gui=underline ctermfg=188 cterm=underline
|
||||
hi VertSplit guifg=#2e3330 guibg=#688060 ctermfg=236 ctermbg=65
|
||||
hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline ctermfg=236 ctermbg=210 cterm=bold
|
||||
hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold ctermfg=231 ctermbg=236 cterm=bold
|
||||
hi WildMenu guifg=#cbecd0 guibg=#2c302d gui=underline ctermfg=194 ctermbg=236 cterm=underline
|
||||
|
||||
" spellchecking, always "bright" term background
|
||||
hi SpellBad guisp=#bc6c4c guifg=#dc8c6c ctermfg=209 ctermbg=237
|
||||
hi SpellCap guisp=#6c6c9c guifg=#8c8cbc ctermfg=103 ctermbg=237
|
||||
hi SpellRare guisp=#bc6c9c guifg=#bc8cbc ctermfg=139 ctermbg=237
|
||||
hi SpellLocal guisp=#7cac7c guifg=#9ccc9c ctermfg=151 ctermbg=237
|
||||
|
||||
if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast
|
||||
" use new darker background
|
||||
hi Normal guifg=#dcdccc guibg=#1f1f1f ctermfg=188 ctermbg=234
|
||||
hi ColorColumn guibg=#33332f ctermbg=235
|
||||
hi CursorLine guibg=#121212 gui=bold ctermbg=233 cterm=none
|
||||
hi CursorLineNr guifg=#f2f3bb guibg=#161616 ctermfg=229 ctermbg=233
|
||||
if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn
|
||||
hi CursorColumn guibg=#121212 gui=bold ctermbg=233 cterm=none
|
||||
else
|
||||
hi CursorColumn guibg=#2b2b2b ctermbg=235 cterm=none
|
||||
endif
|
||||
hi FoldColumn guibg=#161616 ctermbg=233 ctermfg=109
|
||||
hi Folded guibg=#161616 ctermbg=233 ctermfg=109
|
||||
hi LineNr guifg=#9fafaf guibg=#161616 ctermfg=248 ctermbg=233
|
||||
hi NonText guifg=#404040 gui=bold ctermfg=238
|
||||
hi Pmenu guibg=#242424 guifg=#ccccbc ctermfg=251 ctermbg=235
|
||||
hi PmenuSel guibg=#353a37 guifg=#ccdc90 gui=bold ctermfg=187 ctermbg=236 cterm=bold
|
||||
hi MatchParen guifg=#f0f0c0 guibg=#383838 gui=bold ctermfg=229 ctermbg=237 cterm=bold
|
||||
hi SignColumn guibg=#181818 ctermbg=233
|
||||
hi SpecialKey guibg=#242424
|
||||
hi TabLine guifg=#88b090 guibg=#313633 gui=none ctermbg=236 ctermfg=108 cterm=none
|
||||
hi TabLineSel guifg=#ccd990 guibg=#222222 ctermbg=235 ctermfg=186 cterm=bold
|
||||
hi TabLineFill guifg=#88b090 guibg=#313633 gui=none ctermbg=236 ctermfg=108 cterm=none
|
||||
else
|
||||
" Original, lighter background
|
||||
hi Normal guifg=#dcdccc guibg=#3f3f3f ctermfg=188 ctermbg=237
|
||||
hi ColorColumn guibg=#484848 ctermbg=238
|
||||
hi CursorLine guibg=#434443 ctermbg=238 cterm=none
|
||||
hi CursorLineNr guifg=#d2d39b guibg=#262626 ctermfg=230 ctermbg=235
|
||||
if exists("g:zenburn_unified_CursorColumn") && g:zenburn_unified_CursorColumn
|
||||
hi CursorColumn guibg=#434343 ctermbg=238 cterm=none
|
||||
else
|
||||
hi CursorColumn guibg=#4f4f4f ctermbg=239 cterm=none
|
||||
endif
|
||||
hi FoldColumn guibg=#333333 ctermbg=236 ctermfg=109
|
||||
hi Folded guibg=#333333 ctermbg=236 ctermfg=109
|
||||
hi LineNr guifg=#9fafaf guibg=#262626 ctermfg=248 ctermbg=235
|
||||
hi NonText guifg=#5b605e gui=bold ctermfg=240
|
||||
hi Pmenu guibg=#2c2e2e guifg=#9f9f9f ctermfg=248 ctermbg=235
|
||||
hi PmenuSel guibg=#242424 guifg=#d0d0a0 gui=bold ctermfg=187 ctermbg=235 cterm=bold
|
||||
hi MatchParen guifg=#b2b2a0 guibg=#2e2e2e gui=bold ctermfg=145 ctermbg=236 cterm=bold
|
||||
hi SignColumn guibg=#343434 ctermbg=236
|
||||
hi SpecialKey guibg=#444444
|
||||
hi TabLine guifg=#d0d0b8 guibg=#222222 gui=none ctermbg=235 ctermfg=187 cterm=none
|
||||
hi TabLineSel guifg=#f0f0b0 guibg=#333333 gui=bold ctermbg=236 ctermfg=229 cterm=bold
|
||||
hi TabLineFill guifg=#dccdcc guibg=#101010 gui=none ctermbg=233 ctermfg=188 cterm=none
|
||||
|
||||
hi StatusLine ctermbg=144
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_force_dark_Background") && g:zenburn_force_dark_Background
|
||||
" Force dark background, because of a bug in VIM: VIM sets background
|
||||
" automatically during "hi Normal ctermfg=X"; it misinterprets the high
|
||||
" value (234 or 237 above) as a light color, and wrongly sets background to
|
||||
" light. See ":help highlight" for details.
|
||||
set background=dark
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_transparent") && g:zenburn_transparent
|
||||
hi Normal ctermbg=0 guibg=#000000
|
||||
hi Statement ctermbg=NONE
|
||||
hi Title ctermbg=NONE
|
||||
hi Todo ctermbg=NONE
|
||||
hi Underlined ctermbg=NONE
|
||||
hi DiffAdd ctermbg=NONE
|
||||
hi DiffText ctermbg=NONE
|
||||
hi ErrorMsg ctermbg=NONE
|
||||
hi LineNr ctermbg=NONE
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_old_Visual") && g:zenburn_old_Visual
|
||||
if exists("g:zenburn_alternate_Visual") && g:zenburn_alternate_Visual
|
||||
" Visual with more contrast, thanks to Steve Hall & Cream posse
|
||||
" gui=none fixes weird highlight problem in at least GVim 7.0.66, thanks to Kurt Maier
|
||||
hi Visual guifg=#000000 guibg=#71d3b4 gui=none ctermfg=16 ctermbg=79 cterm=none
|
||||
hi VisualNOS guifg=#000000 guibg=#71d3b4 gui=none ctermfg=16 ctermbg=79 cterm=none
|
||||
else
|
||||
" use default visual
|
||||
hi Visual guifg=#233323 guibg=#71d3b4 gui=none ctermfg=235 ctermbg=79 cterm=none
|
||||
hi VisualNOS guifg=#233323 guibg=#71d3b4 gui=none ctermfg=235 ctermbg=79 cterm=none
|
||||
endif
|
||||
else
|
||||
" new Visual style
|
||||
if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast
|
||||
" high contrast
|
||||
"hi Visual guibg=#304a3d
|
||||
"hi VisualNos guibg=#304a3d
|
||||
"TODO no nice greenish in console, 65 is closest. use full black instead,
|
||||
"although i like the green..!
|
||||
hi Visual guibg=#0f0f0f ctermbg=232
|
||||
hi VisualNOS guibg=#0f0f0f ctermbg=232
|
||||
if exists("g:zenburn_transparent") && g:zenburn_transparent
|
||||
hi Visual ctermbg=235
|
||||
endif
|
||||
else
|
||||
" low contrast
|
||||
hi Visual guibg=#2f2f2f ctermbg=235
|
||||
hi VisualNOS guibg=#2f2f2f ctermbg=235
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_alternate_Error") && g:zenburn_alternate_Error
|
||||
" use more jumpy Error
|
||||
hi Error guifg=#e37170 guibg=#664040 gui=bold ctermfg=210 ctermbg=52 cterm=bold
|
||||
else
|
||||
" default is something more zenburn-compatible
|
||||
hi Error guifg=#e37170 guibg=#3d3535 gui=bold ctermfg=167 ctermbg=236 cterm=bold
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_alternate_Include") && g:zenburn_alternate_Include
|
||||
" original setting
|
||||
hi Include guifg=#ffcfaf gui=bold ctermfg=223 cterm=bold
|
||||
else
|
||||
" new, less contrasted one
|
||||
hi Include guifg=#dfaf8f gui=bold ctermfg=180 cterm=bold
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_disable_Label_underline") && g:zenburn_disable_Label_underline
|
||||
hi Label guifg=#dfcfaf ctermfg=187
|
||||
else
|
||||
hi Label guifg=#dfcfaf gui=underline ctermfg=187 cterm=underline
|
||||
endif
|
||||
|
||||
if exists("g:zenburn_color_also_Ignore") && g:zenburn_color_also_Ignore
|
||||
" color the Ignore groups
|
||||
" note: if you get strange coloring for your files, turn this off (unlet)
|
||||
if exists("g:zenburn_high_Contrast") && g:zenburn_high_Contrast
|
||||
hi Ignore ctermfg=238
|
||||
else
|
||||
hi Ignore guifg=#545a4f ctermfg=240
|
||||
endif
|
||||
endif
|
||||
|
||||
" EXPERIMENTAL TagHighlight support
|
||||
" link/set sensible defaults here;
|
||||
"
|
||||
" For now I mostly link to subset of Zenburn colors, the linkage is based
|
||||
" on appearance, not semantics. In later versions I might define more new colours.
|
||||
"
|
||||
" HELP NEEDED to make this work properly.
|
||||
|
||||
if exists("g:zenburn_enable_TagHighlight") && g:zenburn_enable_TagHighlight
|
||||
" CTag support may vary, but the first step is to start using it so
|
||||
" we can fix it!
|
||||
"
|
||||
" Consult /plugin/TagHighlight/data/kinds.txt for info on your
|
||||
" language and what's been defined.
|
||||
"
|
||||
" There is potential for language indepedent features here. (Acutally,
|
||||
" seems it may be required for this to be useful...) This way we can
|
||||
" implement features depending on how well CTags are currently implemented
|
||||
" for the language. ie. Global problem for python is annoying. Special
|
||||
" colors are defined for special language features, etc..
|
||||
"
|
||||
" For now all I care about is python supported features:
|
||||
" c:CTagsClass
|
||||
" f:CTagsFunction
|
||||
" i:CTagsImport
|
||||
" m:CTagsMember
|
||||
" v:CTagsGlobalVariable
|
||||
"
|
||||
" Note: TagHighlight defaults to setting new tags to Keyword
|
||||
" highlighting.
|
||||
|
||||
" TODO conditionally run each section
|
||||
" BEGIN Python Section
|
||||
hi link Class Function
|
||||
hi link Import PythonInclude
|
||||
hi link Member Function
|
||||
"Note: Function is already defined
|
||||
|
||||
" Highlighter seems to think a lot of things are global variables even
|
||||
" though they're not. Example: python method-local variable is
|
||||
" coloured as a global variable. They should not be global, since
|
||||
" they're not visible outside the method.
|
||||
" If this is some very bright colour group then things look bad.
|
||||
" hi link GlobalVariable Identifier
|
||||
|
||||
" Because of this problem I am disabling the feature by setting it to
|
||||
" Normal instead
|
||||
hi link GlobalVariable Normal
|
||||
" END Python Section
|
||||
|
||||
" Starting point for other languages.
|
||||
hi link GlobalConstant Constant
|
||||
hi link EnumerationValue Float
|
||||
hi link EnumerationName Identifier
|
||||
hi link DefinedName WarningMsg
|
||||
hi link LocalVariable WarningMsg
|
||||
hi link Structure WarningMsg
|
||||
hi link Union WarningMsg
|
||||
endif
|
||||
|
||||
" TODO check for more obscure syntax groups that they're ok
|
||||
|
405
vim/vimrc
Normal file
405
vim/vimrc
Normal file
@ -0,0 +1,405 @@
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Maintainer:
|
||||
" Amir Salihefendic
|
||||
" http://amix.dk - amix@amix.dk
|
||||
"
|
||||
" Version:
|
||||
" 5.0 - 29/05/12 15:43:36
|
||||
"
|
||||
" Blog_post:
|
||||
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
|
||||
"
|
||||
" Awesome_version:
|
||||
" Get this config, nice color schemes and lots of plugins!
|
||||
"
|
||||
" Install the awesome version from:
|
||||
"
|
||||
" https://github.com/amix/vimrc
|
||||
"
|
||||
" Syntax_highlighted:
|
||||
" http://amix.dk/vim/vimrc.html
|
||||
"
|
||||
" Raw_version:
|
||||
" http://amix.dk/vim/vimrc.txt
|
||||
"
|
||||
" Sections:
|
||||
" -> General
|
||||
" -> VIM user interface
|
||||
" -> Colors and Fonts
|
||||
" -> Files and backups
|
||||
" -> Text, tab and indent related
|
||||
" -> Visual mode related
|
||||
" -> Moving around, tabs and buffers
|
||||
" -> Status line
|
||||
" -> Editing mappings
|
||||
" -> vimgrep searching and cope displaying
|
||||
" -> Spell checking
|
||||
" -> Misc
|
||||
" -> Helper functions
|
||||
"
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => General
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Sets how many lines of history VIM has to remember
|
||||
set history=700
|
||||
|
||||
" Enable filetype plugins
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
" Set to auto read when a file is changed from the outside
|
||||
set autoread
|
||||
|
||||
" With a map leader it's possible to do extra key combinations
|
||||
" like <leader>w saves the current file
|
||||
let mapleader = ","
|
||||
let g:mapleader = ","
|
||||
|
||||
" Fast saving
|
||||
nmap <leader>w :w!<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => VIM user interface
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Set 7 lines to the cursor - when moving vertically using j/k
|
||||
set so=7
|
||||
|
||||
" Turn on the WiLd menu
|
||||
set wildmenu
|
||||
|
||||
" Ignore compiled files
|
||||
set wildignore=*.o,*~,*.pyc
|
||||
|
||||
"Always show current position
|
||||
set ruler
|
||||
|
||||
" Height of the command bar
|
||||
set cmdheight=2
|
||||
|
||||
" A buffer becomes hidden when it is abandoned
|
||||
set hid
|
||||
|
||||
" Configure backspace so it acts as it should act
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
" When searching try to be smart about cases
|
||||
set smartcase
|
||||
|
||||
" Highlight search results
|
||||
set hlsearch
|
||||
|
||||
" Makes search act like search in modern browsers
|
||||
set incsearch
|
||||
|
||||
" Don't redraw while executing macros (good performance config)
|
||||
set lazyredraw
|
||||
|
||||
" For regular expressions turn magic on
|
||||
set magic
|
||||
|
||||
" Show matching brackets when text indicator is over them
|
||||
set showmatch
|
||||
" How many tenths of a second to blink when matching brackets
|
||||
set mat=2
|
||||
|
||||
" No annoying sound on errors
|
||||
set noerrorbells
|
||||
set novisualbell
|
||||
set t_vb=
|
||||
set tm=500
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Colors and Fonts
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Enable syntax highlighting
|
||||
syntax enable
|
||||
|
||||
set t_Co=256
|
||||
"set background=dark
|
||||
|
||||
" Set extra options when running in GUI mode
|
||||
if has("gui_running")
|
||||
set guioptions-=T
|
||||
set guioptions+=e
|
||||
set t_Co=256
|
||||
set guitablabel=%M\ %t
|
||||
endif
|
||||
|
||||
" Set utf8 as standard encoding and en_US as the standard language
|
||||
set encoding=utf8
|
||||
|
||||
" Use Unix as the standard file type
|
||||
set ffs=unix,dos,mac
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Files, backups and undo
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Turn backup off, since most stuff is in SVN, git et.c anyway...
|
||||
set nobackup
|
||||
set nowb
|
||||
set noswapfile
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Text, tab and indent related
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Use spaces instead of tabs
|
||||
set expandtab
|
||||
|
||||
" Be smart when using tabs ;)
|
||||
set smarttab
|
||||
|
||||
" 1 tab == 4 spaces
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
|
||||
" Linebreak on 500 characters
|
||||
set lbr
|
||||
set tw=500
|
||||
|
||||
set ai "Auto indent
|
||||
set si "Smart indent
|
||||
set wrap "Wrap lines
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Visual mode related
|
||||
""""""""""""""""""""""""""""""
|
||||
" Visual mode pressing * or # searches for the current selection
|
||||
" Super useful! From an idea by Michael Naumann
|
||||
vnoremap <silent> * :call VisualSelection('f')<CR>
|
||||
vnoremap <silent> # :call VisualSelection('b')<CR>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Moving around, tabs, windows and buffers
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Treat long lines as break lines (useful when moving around in them)
|
||||
map j gj
|
||||
map k gk
|
||||
|
||||
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
|
||||
map <space> /
|
||||
map <c-space> ?
|
||||
|
||||
" Disable highlight when <leader><cr> is pressed
|
||||
map <silent> <leader><cr> :noh<cr>
|
||||
|
||||
" Smart way to move between windows
|
||||
map <C-j> <C-W>j
|
||||
map <C-k> <C-W>k
|
||||
map <C-h> <C-W>h
|
||||
map <C-l> <C-W>l
|
||||
|
||||
" Close the current buffer
|
||||
map <leader>bd :Bclose<cr>
|
||||
|
||||
" Close all the buffers
|
||||
map <leader>ba :1,1000 bd!<cr>
|
||||
|
||||
" Useful mappings for managing tabs
|
||||
map <leader>tn :tabnew<cr>
|
||||
map <leader>to :tabonly<cr>
|
||||
map <leader>tc :tabclose<cr>
|
||||
map <leader>tm :tabmove
|
||||
|
||||
" Opens a new tab with the current buffer's path
|
||||
" Super useful when editing files in the same directory
|
||||
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
|
||||
|
||||
" Switch CWD to the directory of the open buffer
|
||||
map <leader>cd :cd %:p:h<cr>:pwd<cr>
|
||||
|
||||
" Specify the behavior when switching between buffers
|
||||
try
|
||||
set switchbuf=useopen,usetab,newtab
|
||||
set stal=2
|
||||
catch
|
||||
endtry
|
||||
|
||||
" Return to last edit position when opening files (You want this!)
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 0 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
" Remember info about open buffers on close
|
||||
set viminfo^=%
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""
|
||||
" => Status line
|
||||
""""""""""""""""""""""""""""""
|
||||
" Always show the status line
|
||||
set laststatus=2
|
||||
|
||||
" Format the status line
|
||||
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Editing mappings
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Remap VIM 0 to first non-blank character
|
||||
map 0 ^
|
||||
|
||||
" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
|
||||
nmap <M-j> mz:m+<cr>`z
|
||||
nmap <M-k> mz:m-2<cr>`z
|
||||
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||
|
||||
if has("mac") || has("macunix")
|
||||
nmap <D-j> <M-j>
|
||||
nmap <D-k> <M-k>
|
||||
vmap <D-j> <M-j>
|
||||
vmap <D-k> <M-k>
|
||||
endif
|
||||
|
||||
" Delete trailing white space on save, useful for Python and CoffeeScript ;)
|
||||
func! DeleteTrailingWS()
|
||||
exe "normal mz"
|
||||
%s/\s\+$//ge
|
||||
exe "normal `z"
|
||||
endfunc
|
||||
autocmd BufWrite *.py :call DeleteTrailingWS()
|
||||
autocmd BufWrite *.coffee :call DeleteTrailingWS()
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => vimgrep searching and cope displaying
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" When you press gv you vimgrep after the selected text
|
||||
vnoremap <silent> gv :call VisualSelection('gv')<CR>
|
||||
|
||||
" Open vimgrep and put the cursor in the right position
|
||||
map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
|
||||
|
||||
" Vimgreps in the current file
|
||||
map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
|
||||
|
||||
" When you press <leader>r you can search and replace the selected text
|
||||
vnoremap <silent> <leader>r :call VisualSelection('replace')<CR>
|
||||
|
||||
" Do :help cope if you are unsure what cope is. It's super useful!
|
||||
"
|
||||
" When you search with vimgrep, display your results in cope by doing:
|
||||
" <leader>cc
|
||||
"
|
||||
" To go to the next search result do:
|
||||
" <leader>n
|
||||
"
|
||||
" To go to the previous search results do:
|
||||
" <leader>p
|
||||
"
|
||||
map <leader>cc :botright cope<cr>
|
||||
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
|
||||
map <leader>n :cn<cr>
|
||||
map <leader>p :cp<cr>
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Spell checking
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Pressing ,ss will toggle and untoggle spell checking
|
||||
map <leader>ss :setlocal spell!<cr>
|
||||
|
||||
" Shortcuts using <leader>
|
||||
map <leader>sn ]s
|
||||
map <leader>sp [s
|
||||
map <leader>sa zg
|
||||
map <leader>s? z=
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Misc
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Remove the Windows ^M - when the encodings gets messed up
|
||||
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
|
||||
|
||||
" Quickly open a buffer for scripbble
|
||||
map <leader>q :e ~/buffer<cr>
|
||||
|
||||
" Toggle paste mode on and off
|
||||
map <leader>pp :setlocal paste!<cr>
|
||||
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Helper functions
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
function! CmdLine(str)
|
||||
exe "menu Foo.Bar :" . a:str
|
||||
emenu Foo.Bar
|
||||
unmenu Foo
|
||||
endfunction
|
||||
|
||||
function! VisualSelection(direction) range
|
||||
let l:saved_reg = @"
|
||||
execute "normal! vgvy"
|
||||
|
||||
let l:pattern = escape(@", '\\/.*$^~[]')
|
||||
let l:pattern = substitute(l:pattern, "\n$", "", "")
|
||||
|
||||
if a:direction == 'b'
|
||||
execute "normal ?" . l:pattern . "^M"
|
||||
elseif a:direction == 'gv'
|
||||
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
|
||||
elseif a:direction == 'replace'
|
||||
call CmdLine("%s" . '/'. l:pattern . '/')
|
||||
elseif a:direction == 'f'
|
||||
execute "normal /" . l:pattern . "^M"
|
||||
endif
|
||||
|
||||
let @/ = l:pattern
|
||||
let @" = l:saved_reg
|
||||
endfunction
|
||||
|
||||
|
||||
" Returns true if paste mode is enabled
|
||||
function! HasPaste()
|
||||
if &paste
|
||||
return 'PASTE MODE '
|
||||
en
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Don't close window, when deleting a buffer
|
||||
command! Bclose call <SID>BufcloseCloseIt()
|
||||
function! <SID>BufcloseCloseIt()
|
||||
let l:currentBufNum = bufnr("%")
|
||||
let l:alternateBufNum = bufnr("#")
|
||||
|
||||
if buflisted(l:alternateBufNum)
|
||||
buffer #
|
||||
else
|
||||
bnext
|
||||
endif
|
||||
|
||||
if bufnr("%") == l:currentBufNum
|
||||
new
|
||||
endif
|
||||
|
||||
if buflisted(l:currentBufNum)
|
||||
execute("bdelete! ".l:currentBufNum)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" colorscheme zenburn
|
||||
" colorscheme eldar
|
||||
|
||||
if v:version < 802
|
||||
packadd! dracula
|
||||
endif
|
||||
syntax enable
|
||||
colorscheme dracula
|
||||
|
Reference in New Issue
Block a user