" " Welcome to Mike's .gvimrc! " " Updated : Sat Jul 20 20:35:00 EDT 2002 version 610 " We are up to date! set backspace=2 " backspace can join lines set shiftwidth=4 " at start of line tabs 4 chars set smarttab " at start of line tabs chars set ruler " show cursor position set nottybuiltin set errorformat=%f:%l:%m,\"%f\"\\,\ line\ %l\:\ %m " This eats gcc and SGI cc/CC set magic " regular expressions the way I'm used to them set nobackup " don't clutter my account with *.bak! set nowritebackup " don't keep a backup copy during the edit session set nodigraph " I don't need sticking digraphs ... set incsearch " Incremental search. set joinspaces " Join adds two spaces after a period. set textwidth=0 " Overriden later by the autocommands " I use the One True Brace Style set cinoptions=>s,{0,}0,?0,^0,:0,=s,p0,t0,+s,(0,)20,*30 "Use the viminfo file to remember edit histories (very useful for me) set viminfo=%,'30,:200,/50,\"500,n~/.viminfo " My key is screwed up set t_kD= " Let K ask Webster for the word under the cursor set keywordprg=webster " Sometimes I edit code with really weird indentation, like *three* " spaces and stuff like that... set shiftround " My message length preferences set shortmess=mrnto set showcmd set showmatch " Oh I hate it when programs do things I didn't ask for set nostartofline " Setting the window title does not work good with screen "set notitle "set cindent " Overriden later by the autocommands "Context lines = 3 set so=3 set comments=sr:/*,mb:*,el:*/,://,b:#,:%,:XCOMM,n:>,fb:- set noautowrite set noerrorbells set dictionary=/usr/dict/words set hidden "set highlight=8r,db,es,hs,mb,Mr,nu,rs,sr,tb,vr,ws set noignorecase " == case-sensitive set modeline " Prints the mode (command/insert) "set nonumber set number set shell=/bin/tcsh set path=.,~/include/**,/usr/include/**,/usr/X11/include/**,/usr/local/include/** set visualbell set ch=2 " Make command line two lines high set tabstop=4 " This makes your code look very ugly " when you read it with more and other editors ... " Some macros I can't do without map :make " execute the command in the current line (minus the first word, which " is intended to be a shell prompt) and insert the output in the buffer map ,e ^wy$:r!" " Underline macro map ,u :s/./&_/g " Bold macro map ,b :s/./&&/g "For changing the color of the Cursor ... map ,hb :hi Cursor guibg=Black guifg=White gui=bold map ,hw :hi Cursor guibg=White guifg=Black gui=bold " Weird keyboard mappings, pgup+pgdn, home+end map O 0 map Oe $ map O 0 map O $ map  j map [4~ $ " Nice autocommands: " Standard settings are: autoindent, wrap in column 85 autocmd BufEnter * set fo=tcq2l ai tw=85 nocin com& " cindent for C files autocmd BufEnter *.c,*.C,*.h,*.H,*.cc,*.java set fo=croql tw=1024 cin " cindent for Perl,CGI files autocmd BufEnter *.pl,*.cgi set fo=croql cin comments=n:# " When editing my vimrc and exrc, the comment is " autocmd BufEnter .vimrc,.gvimrc,.exrc set com=:\" " Makefiles and Polyray input files use "include" as include directive, " not #include autocmd BufEnter *.pi,[Mm]akefile* set include=^include autocmd BufLeave *.pi,[Mm]akefile* set include& " " " command for typedefs ( use syntypes script )... " if file_readable("./typedef.vim") autocmd BufEnter *.c,*.h source ./typedef.vim endif "============================================================================ " These are from the file syntax.vim "============================================================================ " The default methods for highlighting. Can be overridden later. " Many terminals can only use six different colors (plus black and white). " Therefore the number of colors used is kept low. It doesn't look nice with " too many colors anyway. " " Colors from Mike Flouris (C)2002 " " Switch on syntax highlighting. if has("syntax") syntax on " " URL for nice Hex Color Codes: http://www.htmlgoodies.com/colors.html " " hi Normal guibg=Black guifg=#75AF75 gui=bold "Cornsilk = #FFF8DC "Blanchedalmond = #FFEBCD " hi Normal guibg=Black guifg=#95CE95 hi Normal guibg=Black guifg=#FFEBCD gui=bold "PaleVioletRed = #D87093 hi Constant guifg=#D87093 guibg=Black gui=bold "Skyblue = #87CEEB hi Identifier guifg=#87CEEB guibg=Black gui=bold "Salmon = #FA8072 "Mediumseagreen = #3CB371 "Tomato = #FF6347 hi cStatement guifg=#FF6347 guibg=Black hi Statement guifg=#FF6347 guibg=Black "Indianred = #CD5C5C hi Conditional guifg=#CD5C5C gui=bold guibg=Black hi Repeat guifg=#CF6C6C gui=bold guibg=Black "Chocolate = #D2691E "Mediumauqamarine=#66CDAA hi PreProc guifg=#D2691E gui=bold guibg=Black "Burlywood = #DEB887 "Mediumvioletred = #C71585 hi StorageClass guifg=#DEB887 gui=bold guibg=Black hi cType guifg=#D72595 gui=bold guibg=Black hi Type guifg=#D72595 gui=bold guibg=Black "Sandybrown = #F4A460 hi Structure guifg=#F4A460 gui=bold guibg=Black hi Float guifg=#A87020 gui=bold guibg=Black "Darkorange = #FF8C00 hi Include guifg=#FF8C00 gui=bold guibg=Black "Plum = #DDA0DD hi Special guifg=#DDA0DD gui=bold guibg=Black hi Character guifg=#DDA0BB gui=bold guibg=Black "Mediumvioletred = #C71585 hi Macro guifg=#C71585 gui=bold guibg=Black hi PreCondit guifg=#B61575 gui=bold guibg=Black "Hotpink = #FF69B4 "Royalblue = #4169E1 hi String guifg=#4169E1 gui=bold guibg=Black "Goldenrod = #DAA520 hi Operator guifg=#CA9510 gui=bold guibg=Black hi Label guifg=#DAA520 gui=bold guibg=Black "Gold = #FFD700 hi ModeMsg guifg=Black guibg=#FFD700 gui=bold "Deeppink = #FF1493 hi Search guifg=Black guibg=#FF1493 gui=bold "Cornflowerblue = #6495ED "Skyblue = #87CEEB " hi cComment guifg=#87CEEB gui=NONE guibg=Black " hi Comment guifg=#87CEEB gui=NONE guibg=Black hi NonText guibg=Black guifg=#FFDAB9 gui=bold hi Cursor guibg=Red guifg=White gui=bold "The Horizontal & Vertical Split Lines "Mediumauqamarine=#66CDAA hi VertSplit guifg=#ADB8B6 guibg=Black hi StatusLine guifg=#66CDAA guibg=Black hi StatusLineNC guifg=#ADB8B6 guibg=Black " These two change the background "Hotpink = #FF69B4 hi Error guibg=#FF69B4 guifg=White "hi Todo term=standout ctermbg=Yellow guifg=Blue guibg=Yellow "Coral = #FF7F50 hi cTodo guifg=Black guibg=#FF7F50 hi Todo guifg=Black guibg=#FF7F50 "These are my own types "Seagreen = #2E8B57 hi myTypes guifg=#2E8B57 gui=bold guibg=Black "Steelblue = #4682B4 hi myDefines guifg=#4682B4 gui=bold guibg=Black " Switch on search pattern highlighting. set hlsearch " load the types.vim highlighting file, if it exists (To highlight C Types) autocmd BufRead,BufNewFile *.[ch] let fname = expand(':p:h') . '/types.vim' autocmd BufRead,BufNewFile *.[ch] if filereadable(fname) autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname autocmd BufRead,BufNewFile *.[ch] endif endif " Make external commands work through a pipe instead of a pseudo-tty "set noguipty " set the X11 font to use "set guifont=-b&h-lucidux mono-medium-r-normal--11-110-75-75-m-70-iso8859-9 "set guifont=-b&h-lucidux\ mono-medium-r-normal--12-120-75-75-m-70-iso8859-9 "set guifont=-b&h-lucidux\ mono-medium-r-normal--14-130-75-75-m-80-iso8859-9 "set guifont=-B&H-LucidaTypewriter-Medium-R-Normal-Sans-12-120-75-75-M-70-ISO8859-1 " These are X11 Greek fonts ... "set guifont=sc-elot14 "set guifont=mdf-elot16 set guifont=courier.gr.elot.16