" vimrc file used Claudio Fleiner " See http://www.fleiner.com/vim/ version 6.0 " Set to no vi compatibility mode set nocompatible " turn on verbosity " set verbose=10 " define the top hel file set helpfile=$VIM/doc/help.txt " no scrolling acceptable set ttyscroll=0 " create backups set backup " the backup extension set bex=.bak " the backup directories set backupdir=~/tmp,.,~/,/tmp " no mouse in xterm set mouse= " do not wrap lines set nowrap " show the ruler set ruler "don't add two spaces after ., ?, ! set nojoinspaces " define the viminfo file set viminfo='50,"1000,:50,n~/.viminfo " allow the cursor to wrap on anything set whichwrap=b,s,h,l,<,>,[,] " set the characters shown for special cases (must be turned on with set list) se listchars=extends:»,eol:¶,trail:·,tab:»­ " allow backspace to delete newlines and beyond the start of the insertion point set backspace=2 " use autoindentation set ai " we have a fast terminal connection set ttyfast " wildmode: complete to longest match, list on second tab set wildmode=longest,list " default make program to use set makeprg=gmake " the error format works for gcc, javac, jikes (32) (after filtering) set errorformat=%f:%l:%c:%m,%f:kk%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m,\"%f\"\\\,\ line\ %l.%c:%m\,\ %f:%l:%m,%f:%l:%c:%m " write buffers automagically when leaving them set autowrite " recognize ^M files set textauto " check one line for commands in each file set modelines=1 " insert sw spaces when using tab in front of a line set smarttab " insert tabs as spaces set expandtab " set incremental search set incsearch " highlight all search results set hlsearch " set the minimum window height set winminheight=0 " set highlight mode " set highlight=8b,@-,db,es,lb,mb,M-,nu,rs,sr,tb,vr,ws " suffixes to put to the end of the list when completing file names set suffixes=.bak,~,.o,.h,.info,.swp,.class " patterns to put to ignore when completing file names set wildignore=*.bak,~,*.o,*.info,*.swp,*.class " get syntax highlighting let mysyntaxfile = "$VIM/mysyntax/mysyntax.vim" syntax on if version >= 600 filetype plugin on filetype indent on endif " get special definitions for different file types source $VIM/set/set.vim " get directory browser source $VIM/mymacros/dir.vim " get directory browser source $VIM/mymacros/matchit.vim " get search highlighter source $VIM/set/hisearch.vim " define some additional filetypes " GDB au BufRead,BufNewFile .*gdb* set filetype=gdb " Mocha, Wingdis (java decompiler) au BufRead,BufNewFile *.mocha,*.wingdis set filetype=java " Test file used for testing various vim settings au BufRead,BufNewFile test set filetype=test " Assembler x86 preprocessor au BufRead,BufNewFile *\.S set filetype=asms " Assembler au BufRead,BufNewFile *.bS set filetype=myasm " Test file used for testing various vim settings au BufRead,BufNewFile *access_log*,*.httplog set filetype=httplog " dtd files " au BufRead,BufNewFile *.dtd set filetype=dtd " WebMacro files au BufRead,BufNewFile *.wm set filetype=webmacro " config files au BufRead,BufNewFile CONFIG,config set filetype=config " mhtml files au BufRead,BufNewFile *html set filetype=html " html.m4 files " au BufRead,BufNewFile *.html.m4 set filetype=htmlm4 " html.m4 files " au BufRead,BufNewFile *.shtml.m4 set filetype=htmlm4 " jsp au BufRead,BufNewFile *.jsp set filetype=jsp " bytecode tracefiles au BufRead,BufNewFile *.ptr set filetype=bytecodetr " language files au BufRead,BufNewFile *.mxm set filetype=maxima " simulator log files au BufRead,BufNewFile *.lng set filetype=lng " simulator log files au BufRead,BufNewFile sim*.log set filetype=simlog " language files autocmd BufReadPost *.httplog.gz set bin | '[,']!gunzip autocmd BufReadPost *.httplog.gz set nobin | set readonly autocmd BufReadPost *.httplog.gz set filetype=httplog autocmd BufWritePost,FileWritePost *.httplog.gz !mv :r autocmd BufWritePost,FileWritePost *.httplog.gz !gzip -9 :r " map to switch from no dead keys to normal and to html dead keys imap a map :source $VIM/set/text_dead.vim " " F6 - spell file & hilite spelling mistakesk " F6 - return to normal syntax coloring source $VIM/mymacros/vimspell.vim " source the file macros " so $VIM/macros/file_select.vim " set runtime path if version >= 600 set runtimepath=~/.vim,~/lib/vim/vimfiles,~/lib/vim,~ endif " Map F1 to the ESC key in insert mode (useful if ESC and F11 are pretty close together) imap [11~  " Map F1 to help map [11~ :h " map f7 to switch to normal contrast, SF7 to high contrast map :!cat ~/lib/high_contrast map :!cat ~/lib/normal_contrast " Map F8 to show the syntax coloring for a character map :echo synIDattr(synID(line("."),col("."),1),"name") " Map to turn syntax on/off map :if exists("syntax_on") syntax off else syntax on endif " switch from grep to mkid and back map :set grepprg=grep\ -n\ $*\ /dev/null set grepformat=%f:%l:%m,%f:%l%m,%f\ \ %l%m map :set grepprg=lid\ -Rgrep\ -s set grepformat=%f:%l:%m map 8 :exe "grep -w ".expand("") "map , and . to jump up and down the tag list map , :tp map . :tn "map . and , to jump up and down the error/grep list map < :cp map > :cn map V :cc map L :cw " shifted function keys map [23~ map [24~ map [25~ map [26~ map [28~ map [29~ map [31~ map [32~ map [33~ map [34~ map [23$ map [24$ set timeout timeoutlen=400 let java_comment_strings=1 " turn off swapfile in battery mode (to conserve energy) if match(system("/usr/bin/apm"),"off")>0 set updatecount=0 endif set nofoldenable let is_bash=1 let java_allow_cpp_keywords=1 let javaScript_fold=1