many many updates
[dotfiles.git] / vim / .vimrc
1 " Some general options
2 syntax enable
3 filetype indent plugin on
4
5 " Settings
6 set encoding=utf-8
7 set history=1000
8 set number
9 set ruler
10 set backspace=eol,start,indent
11 set whichwrap+=<,>,h,l
12 set incsearch
13 set noerrorbells
14 set novisualbell
15 set nobackup
16 set nowritebackup
17 set noswapfile
18 set colorcolumn=80
19 set textwidth=79
20 set shiftwidth=4
21 set tabstop=4
22 set nowrap
23 set lazyredraw
24 set smartcase
25 set ignorecase
26 set scrolloff=1
27 set sidescrolloff=1
28 set listchars=nbsp:¬,tab:▸\ ,eol:↩,extends:»,precedes:«,trail:•
29 set list
30
31 " Make sure the last line is shown as much as possible
32 set display+=lastline
33
34 " Move through long lines as they were short multiple lines
35 map j gj
36 map k gk
37
38 " Custom split and tabswitching using tab
39 map <TAB>l <C-PageDown>
40 map <TAB>h <C-PageUp>
41 map <TAB><TAB>l <C-W>l
42 map <TAB><TAB>h <C-W>h
43 map <TAB>j <C-W>j
44 map <TAB>k <C-W>k
45
46 " Center the search results
47 nnoremap n nzzzv
48 nnoremap N Nzzzv
49
50 " Allow yanking to the clipboards in visual mode
51 vnoremap sy :w ! xclip<enter><enter>
52 vnoremap cy :w ! xclip -sel clip<enter><enter>
53 " Allow pasting from the clipboards in normal mode
54 nnoremap sp :r ! xclip -o<enter>
55 nnoremap cp :r ! xclip -sel clip -o<enter>
56
57 " Disable ex mode
58 map Q <Nop>
59
60 " Fold settings
61 set foldmethod=marker
62 set foldlevelstart=99
63
64 " GPG options
65 let g:GPGPreferArmor=1
66 let g:GPGPreferSign=1
67
68 " Syntastic options
69 set statusline+=%#warningmsg#
70 set statusline+=%{SyntasticStatuslineFlag()}
71 set statusline+=%*
72
73 let g:syntastic_always_populate_loc_list = 1
74 let g:syntastic_auto_loc_list = 1
75 let g:syntastic_check_on_open = 0
76 let g:syntastic_check_on_wq = 0
77
78 " Vimwiki
79 let g:vimwiki_list = [{'path': '~/projects/kaartenbak'}]
80
81 " Language tools
82 let g:languagetool_jar = '/opt/LanguageTool-5.5/languagetool-commandline.jar'