update modules and disable ex mode
[dotfiles.git] / vim / .vimrc
1 " Automaticly source some files after writing
2 autocmd! bufwritepost .vimrc source %
3
4 " Some general options
5 syntax enable
6 filetype indent plugin on
7 color torte
8 set encoding=utf-8
9 set history=1000
10 set number
11 set ruler
12 set backspace=eol,start,indent
13 set whichwrap+=<,>,h,l
14 set incsearch
15 set noerrorbells
16 set novisualbell
17 set nobackup
18 set nowritebackup
19 set noswapfile
20 set colorcolumn=80
21 set textwidth=79
22 set shiftwidth=4
23 set tabstop=4
24 set nowrap
25
26 " List characters to mark trailing whitespace etc
27 set listchars=nbsp:¬,tab:▸\ ,eol:↩,extends:»,precedes:«,trail:•
28 set list
29
30 " Move through long lines as they were short multiple lines
31 map j gj
32 map k gk
33
34 " Custom split and tabswitching using tab
35 map <TAB>l <C-PageDown>
36 map <TAB>h <C-PageUp>
37 map <TAB><TAB>l <C-W>l
38 map <TAB><TAB>h <C-W>h
39 map <TAB>j <C-W>j
40 map <TAB>k <C-W>k
41
42 " Center the search results
43 nnoremap n nzzzv
44 nnoremap N Nzzzv
45
46 " Disable ex mode
47 map Q <Nop>
48
49 " Fold settings
50 set foldmethod=marker
51 set foldlevelstart=99
52
53 " Unbind arrow keys, who has them anyways on the keyboard...
54 for prefix in ['i', 'n', 'v']
55 for key in ['<UP>', '<DOWN>', '<LEFT>', '<RIGHT>']
56 exe prefix . "noremap " . key . " <Nop>"
57 endfor
58 endfor
59
60 " GPG options
61 let g:GPGPreferArmor=1
62 let g:GPGPreferSign=1
63
64 " Syntastic options
65 set statusline+=%#warningmsg#
66 set statusline+=%{SyntasticStatuslineFlag()}
67 set statusline+=%*
68
69 let g:syntastic_always_populate_loc_list = 1
70 let g:syntastic_auto_loc_list = 1
71 let g:syntastic_check_on_open = 0
72 let g:syntastic_check_on_wq = 0
73
74 " Vimtex options
75 let g:vimtex_compiler_enabled = 0
76
77 " Background transparency
78 hi Normal guibg=NONE ctermbg=NONE