vim/gvimrc

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