*nohtml*

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