vim/gvimrc

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