remove superfluos whitespace
[dotfiles.git] / .vimrc
1 " Package manager
2 execute pathogen#infect()
3
4 " Automaticly source some files after writing
5 autocmd! bufwritepost .vimrc source %
6 autocmd! bufwritepost .bashrc !source %
7 autocmd! bufwritepost .Xresources !xrdb -merge %
8
9 " Some general options
10 syntax enable
11 filetype indent plugin on
12 set encoding=utf-8
13 set history=1000
14 set number
15 set ruler
16 set backspace=eol,start,indent
17 set whichwrap+=<,>,h,l
18 set incsearch
19 set noerrorbells
20 set novisualbell
21 set nobackup
22 set nowb
23 set noswapfile
24 set cc=80
25 set textwidth=79
26
27 " Custom split switching using tab
28 map <TAB>l <C-W>l
29 map <TAB>h <C-W>h
30 map <TAB>j <C-W>j
31 map <TAB>k <C-W>k
32
33 " Center the search results
34 nnoremap n nzzzv
35 nnoremap N Nzzzv
36
37 " Unbind arrow keys, who has them anyways on the keyboard...
38 for prefix in ['i', 'n', 'v']
39 for key in ['<UP', '<DOWN>', '<LEFT>', '<RIGHT>']
40 exe prefix . "noremap " . key . " <Nop>"
41 endfor
42 endfor
43
44 " GPG options
45 let g:GPGPreferArmor=1
46 let g:GPGPreferSign=1
47
48 " Syntastic options
49 set statusline+=%#warningmsg#
50 set statusline+=%{SyntasticStatuslineFlag()}
51 set statusline+=%*
52
53 let g:syntastic_always_populate_loc_list = 1
54 let g:syntastic_auto_loc_list = 1
55 let g:syntastic_check_on_open = 0
56 let g:syntastic_check_on_wq = 0