1 " My personal vim, nvim, gvim configuration
2 " Author: Stefan Huber <shuber@sthu.org>
13 set listchars=tab:»,trail:·,eol:$
26 set wildmode=longest,list:full
33 filetype plugin indent on
36 let g:airline_powerline_fonts=1
37 let g:airline#extensions#tabline#enabled=1
38 let g:airline#extensions#branch#enabled=1
40 let g:gruvbox_contrast_light='hard'
41 let g:gruvbox_contrast_dark='hard'
42 let g:gruvbox_italic = 1
46 " let NERDTreeWinPos="right"
47 let NERDTreeHijackNetrw=0
48 let NERDTreeWinSize=22
49 let NERDTreeQuitOnOpen=1
50 "au VimEnter * if !argc() | Startify | NERDTree | wincmd w
52 let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck']
53 let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck']
55 call neomake#configure#automake('w')
56 "let g:neomake_logfile = '/tmp/neomake.log'
58 let g:clang_compilation_database = '.'
60 let g:deoplete#enable_at_startup=1
64 "au FileType markdown,mkd call pencil#init()
65 "au FileType text call pencil#init()
66 "au FileType mail call pencil#init()
67 "au FileType tex call pencil#init()
70 let g:vim_markdown_folding_disabled=1
71 let g:vim_markdown_frontmatter=1
72 let g:vim_markdown_math=1
74 let g:guesslang_langs=[ 'en_US', 'de_AT']
75 au FileType text,markdown,mail,tex setlocal spell
76 au BufReadPost * :DetectIndent
78 au BufEnter *.c* let b:fswitchlocs='reg:/lib/include/,rel:.'
79 au BufEnter *.h* let b:fswitchlocs='reg:/include/lib/,rel:.'
81 au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh'
82 au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp'
86 au Filetype mail syn match Statement /^\s*-*\s*>8\s*-*\s*$/
87 au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/
90 au BufRead,BufNewFile ~/.mutt/tmp/*mutt-* set filetype=mail
91 au BufRead,BufNewFile *.muttrc set filetype=muttrc
93 " Some settings for tex files
94 au BufRead,BufNewFile *.cls set filetype=tex
95 au Filetype tex set shiftwidth=2
97 au BufRead,BufNewFile *.plt set filetype=gnuplot
99 :let g:org_todo_keywords = [['TODO(t)', 'WAITING(w)', '|', 'DONE(d)'],
100 \ ['|', 'OBSOLETE(o)'],
103 " Trailing whitespace
104 highlight default link TrailingWhitespace SpellCap
105 " Make trailing whitespace be flagged as bad.
106 au BufRead,BufNewFile * syn match TrailingWhitespace /\s\+$/ containedin=ALL
111 if filereadable($HOME . '/.vim/init-local.vim')
112 source ~/.vim/init-local.vim