e70d8b5ca2f515c1f098319517a43573200e6536
[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 " Fold settings
47 set foldmethod=marker
48 set foldlevelstart=99
49
50 " Unbind arrow keys, who has them anyways on the keyboard...
51 for prefix in ['i', 'n', 'v']
52 for key in ['<UP>', '<DOWN>', '<LEFT>', '<RIGHT>']
53 exe prefix . "noremap " . key . " <Nop>"
54 endfor
55 endfor
56
57 " GPG options
58 let g:GPGPreferArmor=1
59 let g:GPGPreferSign=1
60
61 " Syntastic options
62 set statusline+=%#warningmsg#
63 set statusline+=%{SyntasticStatuslineFlag()}
64 set statusline+=%*
65
66 let g:syntastic_always_populate_loc_list = 1
67 let g:syntastic_auto_loc_list = 1
68 let g:syntastic_check_on_open = 0
69 let g:syntastic_check_on_wq = 0
70
71 " Vimtex options
72 let g:vimtex_compiler_enabled = 0
73
74 " Background transparency
75 hi Normal guibg=NONE ctermbg=NONE