My Vim Preferences

gvimrc

syntax on

"----------------------------------
"Color: light vs dark background
"----------------------------------

"Light :
"hi Normal guibg=White guifg=black

"Dark :
set background=dark
hi Normal guibg=black guifg=White

set encoding=utf-8
set tw=0

syntax.vim or syncolor.vim (color section only)

if &background == "dark"
  SynColor Comment      term=bold cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=NONE guifg=SeaGreen guibg=NONE
  SynColor Constant     term=underline cterm=NONE ctermfg=Yellow ctermbg=NONE gui=NONE guifg=#ffff44 guibg=NONE
  SynColor Special      term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE
  SynColor Identifier   term=underline cterm=bold ctermfg=DarkYellow ctermbg=NONE gui=NONE guifg=#bb6600 guibg=NONE
  SynColor Statement    term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=bold guifg=#40ffff guibg=NONE
  SynColor PreProc      term=underline cterm=NONE ctermfg=Grey ctermbg=NONE gui=NONE guifg=Grey50 guibg=NONE
  SynColor Type         term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#66ff60 guibg=NONE
  SynColor Underlined   term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff
  SynColor Ignore       term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE
  SynColor Notice       term=reverse cterm=NONE ctermfg=NONE ctermbg=DarkRed gui=NONE guifg=NONE guibg=#330000
  SynColor Todo         term=standout cterm=NONE ctermfg=Grey ctermbg=Yellow gui=NONE guifg=#bbbbbb guibg=#553311
"JDO :
  SynColor Search       term=reverse ctermfg=White ctermbg=DarkRed guifg=White guibg=#006666
  SynColor Folded       term=underline cterm=NONE ctermfg=Black ctermbg=Grey guifg=White guibg=#111111
  SynColor Visual       term=reverse cterm=reverse guibg=#004400
else
  SynColor Comment      term=bold cterm=NONE ctermfg=Blue ctermbg=NONE gui=NONE guifg=DarkGreen guibg=NONE
  SynColor Constant     term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=DarkRed guibg=NONE
  SynColor Special      term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE
  SynColor Identifier   term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=Purple guibg=NONE
  SynColor Statement    term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=NONE guifg=Blue guibg=NONE
  SynColor PreProc      term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=Grey50 guibg=NONE
  SynColor Type         term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE
  SynColor Underlined   term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue
  SynColor Ignore       term=NONE cterm=NONE ctermfg=White ctermbg=NONE gui=NONE guifg=bg guibg=NONE
  SynColor Notice       term=reverse cterm=NONE ctermfg=Black ctermbg=Cyan gui=NONE guifg=NONE guibg=#ffdddd
  SynColor Todo         term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
"JDO :
  SynColor Title        term=bold cterm=bold ctermfg=DarkCyan ctermbg=NONE gui=bold guifg=#884400 guibg=NONE
endif
SynColor Error   term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red

" Common groups that link to default highlighting.
SynLink String            Constant
SynLink Character         Constant
SynLink Number            Constant
SynLink Boolean           Constant
SynLink Float             Number
SynLink Function          Identifier
SynLink Conditional       Statement
SynLink Repeat            Statement
SynLink Label             Statement
SynLink Operator          Statement
SynLink Keyword           Statement
SynLink Exception         Statement
SynLink Include           PreProc
SynLink Define            PreProc
SynLink Macro             PreProc
SynLink PreCondit         PreProc
SynLink StorageClass      Type
SynLink Structure         Type
SynLink Typedef           Type
SynLink Tag               Special
SynLink SpecialChar       Special
SynLink Delimiter         Special
SynLink SpecialComment    Special
SynLink Debug             Special

Overlength highlighting (syntax.vim / syncolor.vim)

"synatx.vim
match OverLength /\%>80v.\+/

"syncolor.vim
SynLink OverLength   Notice
command! OverLengthOff hi link OverLength NONE
command! OLO OverLengthOff
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License