vim/gvimrc

   1 set guioptions-=m
   2 set guioptions-=T
   3 set guioptions-=L
   4 set guioptions-=r
   5 
   6 set columns=86 lines=42
   7 set number colorcolumn=81
   8 set vb t_vb=
   9 
  10 let &guifont = 'Ubuntu Mono 12'
  11 let startify_bookmarks = [{'s': '~/Documents/Заметки.txt'}]
  12 
  13 if has('win32')
  14     set guifont=Consolas:h11
  15     set guioptions-=m lines=36
  16 endif
  17 
  18 " Colors {{{
  19 
  20 hi clear
  21 syntax on
  22 
  23 let s:bg = '#f3f3f3'
  24 let s:fg = '#111111'
  25 
  26 let s:str = 'maroon'
  27 let s:num = 'navy'
  28 let s:com = '#999999'
  29 let s:msg = 'green'
  30 let s:gui = '#e3e3e3'
  31 let s:todo = 'orange'
  32 
  33 let indentLine_color_gui = s:gui
  34 
  35 function! s:set(name, ...) " {{{
  36     let l:exec  = ['hi!']
  37     let l:exec += [a:name]
  38     let l:exec += [a:0 > 0 ? 'guifg='.a:1 : '']
  39     let l:exec += [a:0 > 1 ? 'guibg='.a:2 : '']
  40     let l:exec += ['gui=NONE'.(a:0 > 2 ? ','.a:3 : '')]
  41 
  42     exec join(l:exec, ' ')
  43 endfunction " }}}
  44 function! s:link(to, from) " {{{
  45     exec join(['hi! link', a:to, a:from], ' ')
  46 endfunction " }}}
  47 
  48 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  49 
  50 call s:set('Normal', s:fg, s:bg)
  51 call s:set('Visual', 'NONE', 'NONE', 'reverse')
  52 
  53 call s:set('Comment', s:com)
  54 call s:set('Constant', s:str)
  55 call s:set('Number', s:num)
  56 call s:set('Boolean', s:fg)
  57 
  58 call s:link('Identifier', 'Boolean')
  59 call s:set('Statement', s:fg, 'NONE', 'bold')
  60 call s:link('Operator', 'Boolean')
  61 call s:link('PreProc', 'Statement')
  62 call s:link('Type', 'Statement')
  63 
  64 call s:link('Special', 'Boolean')
  65 call s:link('SpecialChar', 'Constant')
  66 call s:link('SpecialComment', 'Comment')
  67 
  68 call s:set('Underlined', 'NONE', 'NONE', 'underline')
  69 
  70 call s:set('Error', s:str, 'NONE')
  71 call s:set('Todo', s:todo, 'NONE')
  72 
  73 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  74 
  75 call s:set('NonText', s:com)
  76 call s:link('SpecialKey', 'NonText')
  77 
  78 call s:link('Search', 'Underlined')
  79 call s:set('IncSearch', s:fg, s:todo)
  80 call s:set('MatchParen', s:fg, s:com)
  81 
  82 call s:set('DiffAdd', s:msg, s:bg, 'reverse')
  83 call s:set('DiffChange', s:todo, s:bg, 'reverse')
  84 call s:set('DiffDelete', s:str, s:bg, 'reverse')
  85 call s:set('DiffText', 'NONE', 'NONE', 'reverse')
  86 
  87 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  88 
  89 call s:set('SignColumn', 'NONE', 'NONE')
  90 call s:set('LineNr', s:com, 'NONE')
  91 
  92 call s:link('Folded', 'LineNr')
  93 call s:link('FoldColumn', 'Folded')
  94 
  95 call s:set('CursorLine', 'NONE', s:gui)
  96 call s:set('CursorLineNr', s:com, s:gui)
  97 
  98 call s:link('ColorColumn', 'CursorLine')
  99 call s:set('VertSplit', s:gui, 'NONE')
 100 
 101 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 102 
 103 call s:set('Title', s:fg)
 104 call s:link('Directory', 'Title')
 105 call s:link('Question', 'Title')
 106 
 107 call s:set('ModeMsg', s:fg)
 108 call s:link('MoreMsg', 'Title')
 109 call s:link('WarningMsg', 'Error')
 110 call s:link('ErrorMsg', 'Error')
 111 
 112 call s:set('WildMenu', s:fg, s:bg, 'reverse')
 113 call s:link('Pmenu', 'StatusLine')
 114 call s:link('PmenuSel', 'WildMenu')
 115 
 116 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 117 
 118 call s:set('StatusLine', s:fg, s:gui)
 119 call s:link('StatusLineNC', 'CursorLineNr')
 120 
 121 call s:set('User1', 'NONE', 'NONE')
 122 call s:link('User2', 'ModeNormal')
 123 
 124 call s:set('ModeNormal', s:fg, s:bg, 'reverse')
 125 call s:set('ModeInsert', s:num, s:bg, 'reverse')
 126 call s:set('ModeVisual', s:todo, s:bg, 'reverse')
 127 call s:set('ModeReplace', s:str, s:bg, 'reverse')
 128 
 129 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 130 
 131 call s:link('JavaScriptVariable', 'Statement')
 132 call s:link('JavaScriptNumber', 'Number')
 133 call s:link('JavaScriptObjectLabel', 'Boolean')
 134 
 135 " }}}
 136