This is my .vimrc file -- configuration options for vim, the "vi improved" text editor for grown ups.
1
2 :autocmd!
3
4 set nohlsearch
5
6 " Press F2 to word-wrap a block of text. It's almost like using Word
7 " Star all over again.
8
9 map
10
11 " Personally, I wouldn't use a C++ keyword as a Java identifier, but
12 " if someone else does, I don't want an ugly display, so turn off
13 " flagging of this as an error:
14
15 let java_allow_cpp_keywords=1
16
17 set autoindent
18 set cmdheight=2
19
20 " Strewth, what a mess. Copied from the vim docs, if memory serves.
21
22 set comments=s:/*,mb:**,ex:*/,://,b:#,b:##,:%,:XCOMM,n:>,fb:-
23
24 set formatoptions=orc
25 set history=20
26 set incsearch
27 set ignorecase
28 set keywordprg=
29 set mouse=a
30 set mousehide
31 set mousemodel=popup_setpos
32 set nowrapscan
33 set path=.,/usr/include,/usr/local/include
34 set smartcase
35 set nosmartindent
36 set smarttab
37 set showmode
38 set textwidth=70
39 set viminfo='50,\"10000,n~/.viminfo
40 set wildchar=9
41 set wildignore+=*.class,*.pyc
42 set wildmenu
43
44 syntax on
45
46 :autocmd FileType * set shiftwidth=4
47 :autocmd FileType xml,html set shiftwidth=2
48 :autocmd FileType java,c,cc,cpp set nocindent
49
50 set makeprg=ant
51
52 " Bleurgh! This makes sense of ant/jikes error messages so the ":make"
53 " command works. But, I ask you, how the f**k can anyone make sense of
54 " that mess?
55
56 set efm=\ %#[javac]\ %#%f:%l:%c:%*\\d:%*\\d:\ %t%[%^:]%#:%m,\%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%
57
58 " For the style of comments I like in 'C', C++ and Java.
59
60 autocmd BufNewFile,BufRead *.java set comments=s:/*,mb:**,ex:*/
61 autocmd BufNewFile,BufRead *.c set comments=s:/*,mb:**,ex:*/
62 autocmd BufNewFile,BufRead *.cc set comments=s:/*,mb:**,ex:*/
63