" Created by MM " Last updated: 3.5.11.15.01 " Add highlight search " globals set modeline filetype indent on syntax on set mouse=a set incsearch set sm "showmatch set ai "autoindent set smartindent set formatoptions+=r set autowrite set list listchars=tab:»\ ,trail:·,extends:»,precedes:« "whitespaces set tw=79 "implicit textwidth set hls "highlight search au FileType c,cpp set cin tw=78 au FileType haskell set tw=78 sw=2 sts=2 et au FileType python set ai sw=4 sts=4 et tw=78 au FileType matlab set sw=2 sts=2 noet "au FileType java set ai noet sw=2 sts=2 cin tw=78 au FileType java set cin tw=80 au FileType tex set ai et sw=2 sts=2 tw=78 "au FileType tex so ~/.vim/abbrevs.vim " from ddvlad - LaTeX mappings " from ddvlad, ease filetype recognition au BufRead,BufNewFile *.tex setlocal ft=tex au FileType html set ai et sw=2 sts=2 tw=78 au FileType xml set ai et sw=2 sts=2 tw=78 au FileType sh set ai et sw=4 sts=4 au FileType v set ai et sw=4 sts=4 tw=78 au FileType vhdl set ai et sw=4 sts=4 tw=78 " from Alexandru Moșoi via ddvlad set statusline=%<%f\ %y%h%m%r%=%-24.(0x%02B,%l/%L,%c%V%)\ %P set laststatus=2 set wildmenu nnoremap :cnext nnoremap :cprev nnoremap :make " from Cosmin Ratiu via ddvlad if has("cscope") " Look for a 'cscope.out' file starting from the current directory, " going up to the root directory. let s:dirs = split(getcwd(), "/") while s:dirs != [] let s:path = "/" . join(s:dirs, "/") if (filereadable(s:path . "/cscope.out")) execute "cs add " . s:path . "/cscope.out " . s:path . " -v" break endif let s:dirs = s:dirs[:-2] endwhile set csto=0 " Use cscope first, then ctags set cst " Only search cscope set csverb " Make cs verbose nmap s :cs find s =expand("") nmap g :cs find g =expand("") nmap c :cs find c =expand("") nmap t :cs find t =expand("") nmap e :cs find e =expand("") nmap f :cs find f =expand("") nmap i :cs find i ^=expand("")$ nmap d :cs find d =expand("") " Open a quicfix window for the following queries. set cscopequickfix=s-,c-,d-,i-,t-,e-,g- endif "dictionar " aw = autowrite " sm = showmatch (paranteze) " ai = autoindent " cin = cindent " tw = text width " sw = shiftwidth " sts = soft tab stops " et, noet = expand tabs "