set noeol set hidden set cindent set cinkeys={,},:,0#,!^F,o,O,e set cinoptions={.5s,}0,g0,^-2 set sw=4 set noexpandtab set timeoutlen=100 set formatoptions=tcq2 set formatprg=par set errorformat=%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\ \ from\ %f:%l%m "set directory=/var/spool/preserve set so=5 set path=.,/usr/include,,/usr/X11/include,/usr/local/include,/opt/include set shm=aoI let c_minlines = 800 if v:version >= 600 set fileencodings=utf-8,latin1 set termencoding=utf-8 set encoding=utf-8 set foldmethod=syntax endif "let papp_include_html = 1 let perl_include_pod = 1 let perl_extended_vars = 1 let perl_sync_dist = 800 let filetype_rtn="m" set is ru ai wa bk aw set sws=fsync "set bdir=/tmp/ set wh=10 set bs=2 " allow backspacing over everything in insert mode set ai " always set autoindenting on set tw=78 " always limit the width of text to 78 set backup " keep a backup file set nowrap set textwidth=999 set terse set expandtab "set viminfo='50,\"80 " read/write a .viminfo file, don't store more " " than 50 lines of registers " Enable editing of gzipped files " read: set binary mode before reading the file " uncompress text in buffer after reading " write: compress file after writing " append: uncompress file, append, compress file autocmd BufReadPre,FileReadPre *.gz set bin modifiable autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip autocmd BufReadPost,FileReadPost *.gz set nobin autocmd BufWritePost,FileWritePost *.gz !mv :r autocmd BufWritePost,FileWritePost *.gz !gzip :r autocmd FileAppendPre *.gz !gunzip autocmd FileAppendPre *.gz !mv :r autocmd FileAppendPost *.gz !mv :r autocmd FileAppendPost *.gz !gzip :r autocmd BufAdd * nested ball " some more personal macros map Q gqap map! [1~ map [1~ map! [4~ map [4~ " Insert mode: Typing an opening curly bracket will insert a pair of " curly brackets and move the cursor before the closing curly bracket: ":inoremap { {}i " Insert mode: Typing a closing curly bracket will jump after the next closing " curly bracket (this assumes that curly brackets are always inserted as a pair.) ":inoremap } /}/e+1i " don't unindent '#' inoremap # X# " handy for german keyboards map ö : map ä :up map ü za " there is a tab at the end of the next line(!) imap  map  dd map ^ :bn "map . " if 0 map :if exists("syntax_on") \ syntax off \ else \ syntax on \ set syntax=mumps \ endif map :set syntax=mumps else " specific to the GT.M Perl project function Codegen() let d = getcwd() if match(d, "/gtm_perl/") setlocal tags=/dev/shm/work/gtm_perl/tags setlocal makeprg=/dev/shm/work/gtm_perl/sr_perl/scripts/build\-dbg\-perl endif make endfunction map :copen map :call Codegen() map :cprevious map :cnext imap :copen imap :call Codegen() imap :cprevious imap :cnext endif set background=dark " When starting to edit a file: " For *.c and *.h files set formatting of comments and set C-indenting on " For other files switch it off " Don't change the sequence, it's important that the line with * comes first. autocmd BufRead * set cindent cinkeys={,},:,!^F,o,O,e cinoptions={.5s,}0,g0,^-2 sw=3 foldlevel=99 autocmd BufRead *.c,*.h,*.xs set formatoptions=croql cindent cinkeys={,},:,0#,!^F,o,O,e cinoptions={.5s,}0,g0,^-2 sw=2 comments=sr:/*,mb:*,el:*/,:// " :set cinoptions={0.5s,^-2,e-2,n-2,p2s,(0 # GNU style? if &t_Co > 1 syntax on endif " @@@ ugly hack au BufNewFile,BufRead ptest.c set makeprg=make\ -f\ ptest.mk au BufNewFile,BufRead *.m set syn=mumps au BufNewFile,BufRead *.xs set syn=c au BufNewFile,BufRead *.fc set syn=c au BufNewFile,BufRead mutt*,*.txt set tw=77 ai nocindent au BufNewFile,BufRead mutt*,*.txt set fileencodings=utf-8 au BufNewFile,BufRead *.m set fileencodings=CSISO21GERMAN au BufNewFile,BufRead mutt* set syn=mail au BufReadPost,FileReadPost *.pd set syn=perl ai set exrc iab cdata> O iab phtml> O iab macro> k0f"a iab module> k0f"a iab callback> k0f"a " au BufReadPost,FileReadPost *.papp so /opt/share/vim/vim60/syntax/papp.vim au BufReadPost,FileReadPost *.jan so /opt/share/vim/vim60/syntax/janman.vim " add ; to the end-of-line, unless one is already there map ; :s/;*$/;/ " call macro q map q @q set gfn=tixus if !exists(":Mi") command Mi :%!myindent endif function! CleverTab() if strpart( getline('.'), 0, col('.')-1 ) =~ '^\s*$' return "\" else return "\" endfunction inoremap =CleverTab() set showmatch ball set tags=/dev/shm/work/gtm_perl/tags set ic