vim/gvimrc

   1 set vb t_vb=
   2 set guioptions-=T
   3 
   4 set showtabline=2 guitabtooltip=%F
   5 set guitablabel=%N:%t%{&mod?'*':''}
   6 
   7 set guifont=Liberation\ Mono\ 10
   8 set number cursorline colorcolumn=81
   9 set guicursor+=a:blinkwait500-blinkon500-blinkoff500
  10 
  11 let indentLine_concealcursor = ''
  12 let indentLine_color_gui = '#bbbbbb'
  13 
  14 au FocusGained * call writefile([v:servername], expand('~/.vim/vimpid'))
  15 
  16 " Colors {{{
  17 
  18 hi clear
  19 syntax on
  20 
  21 let s:bg = '#fdfdfd'
  22 let s:fg = '#111111'
  23 
  24 let s:str = '#800000'
  25 let s:num = '#000080'
  26 let s:com = '#999999'
  27 let s:msg = '#008000'
  28 let s:gui = '#e3e3e3'
  29 let s:todo = '#ffa500'
  30 
  31 function! s:set(name, ...) " {{{
  32     let l:exec  = ['hi!']
  33     let l:exec += [a:name]
  34     let l:exec += [a:0 > 0 ? 'guifg='.a:1 : '']
  35     let l:exec += [a:0 > 1 ? 'guibg='.a:2 : '']
  36     let l:exec += ['gui=NONE'.(a:0 > 2 ? ','.a:3 : '')]
  37 
  38     exec join(l:exec, ' ')
  39 endfunction " }}}
  40 function! s:link(to, from) " {{{
  41     exec join(['hi! link', a:to, a:from], ' ')
  42 endfunction " }}}
  43 
  44 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  45 
  46 call s:set('Normal', s:fg, s:bg)
  47 call s:set('Visual', 'NONE', 'NONE', 'reverse')
  48 
  49 call s:set('Comment', s:com)
  50 call s:set('Constant', s:str)
  51 call s:set('Number', s:num)
  52 call s:set('Boolean', s:fg)
  53 
  54 call s:link('Identifier', 'Boolean')
  55 call s:set('Statement', s:fg, 'NONE', 'bold')
  56 call s:link('Operator', 'Boolean')
  57 call s:link('PreProc', 'Statement')
  58 call s:link('Type', 'Statement')
  59 
  60 call s:link('Special', 'Boolean')
  61 call s:link('SpecialChar', 'Constant')
  62 call s:link('SpecialComment', 'Comment')
  63 
  64 call s:set('Underlined', 'NONE', 'NONE', 'underline')
  65 
  66 call s:set('Error', s:str, 'NONE')
  67 call s:set('Todo', s:todo, 'NONE')
  68 
  69 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  70 
  71 call s:set('NonText', s:com)
  72 call s:link('SpecialKey', 'NonText')
  73 
  74 call s:link('Search', 'Underlined')
  75 call s:set('IncSearch', s:fg, s:todo)
  76 call s:set('MatchParen', s:fg, s:com)
  77 
  78 call s:set('DiffAdd', s:msg, s:bg, 'reverse')
  79 call s:set('DiffChange', s:todo, s:bg, 'reverse')
  80 call s:set('DiffDelete', s:str, s:bg, 'reverse')
  81 call s:set('DiffText', 'NONE', 'NONE', 'reverse')
  82 
  83 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  84 
  85 call s:set('SignColumn', 'NONE', 'NONE')
  86 call s:set('LineNr', s:com, 'NONE')
  87 
  88 call s:link('Folded', 'LineNr')
  89 call s:link('FoldColumn', 'Folded')
  90 
  91 call s:set('CursorLine', 'NONE', s:gui)
  92 call s:set('CursorLineNr', s:com, s:gui)
  93 
  94 call s:link('ColorColumn', 'CursorLine')
  95 call s:set('VertSplit', s:gui, 'NONE')
  96 
  97 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  98 
  99 call s:set('Title', s:fg)
 100 call s:link('Directory', 'Title')
 101 call s:link('Question', 'Title')
 102 
 103 call s:set('ModeMsg', s:fg)
 104 call s:link('MoreMsg', 'Title')
 105 call s:link('WarningMsg', 'Error')
 106 call s:link('ErrorMsg', 'Error')
 107 
 108 call s:set('WildMenu', s:fg, s:bg, 'reverse')
 109 call s:link('Pmenu', 'StatusLine')
 110 call s:link('PmenuSel', 'WildMenu')
 111 
 112 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 113 
 114 call s:set('StatusLine', s:fg, s:gui)
 115 call s:set('StatusLineNC', s:fg, s:bg, 'reverse')
 116 
 117 call s:link('User1', 'StatusLine')
 118 call s:link('User2', 'ModeNormal')
 119 
 120 call s:set('ModeNormal', s:fg, s:bg, 'reverse')
 121 call s:set('ModeInsert', s:num, s:bg, 'reverse')
 122 call s:set('ModeVisual', s:todo, s:bg, 'reverse')
 123 call s:set('ModeReplace', s:str, s:bg, 'reverse')
 124 
 125 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 126 
 127 call s:link('JavaScriptNumber', 'Number')
 128 call s:link('JavaScriptVariable', 'Statement')
 129 call s:link('JavaScriptObjectLabel', 'Boolean')
 130 
 131 call s:link('LuaFunction', 'Statement')
 132 call s:link('LuaOperator', 'Statement')
 133 
 134 call s:set('DiffAdded', s:msg, s:bg)
 135 call s:set('DiffChanged', s:todo, s:bg)
 136 call s:set('DiffRemoved', s:str, s:bg)
 137 
 138 " }}}