1 " My personal vim, nvim, gvim configuration
2 " Author: Stefan Huber <shuber@sthu.org>
5 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
16 set listchars=tab:»,trail:·,eol:$
19 filetype plugin indent on
34 set wildmode=longest,list:full
44 highlight default link TrailingWhitespace SpellCap
45 " Make trailing whitespace be flagged as bad.
46 au BufRead,BufNewFile * syn match TrailingWhitespace /\s\+$/ containedin=ALL
49 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
50 " Some global plugin settings
54 let g:airline_powerline_fonts=1
55 let g:airline#extensions#tabline#enabled=1
56 let g:airline#extensions#branch#enabled=1
58 let g:gruvbox_contrast_light='hard'
59 let g:gruvbox_contrast_dark='hard'
60 let g:gruvbox_italic = 1
64 " let NERDTreeWinPos="right"
65 let NERDTreeHijackNetrw=0
66 let NERDTreeWinSize=22
67 let NERDTreeQuitOnOpen=1
68 "au VimEnter * if !argc() | Startify | NERDTree | wincmd w
70 let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck']
71 let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck']
73 call neomake#configure#automake('w')
74 "let g:neomake_logfile = '/tmp/neomake.log'
76 let g:clang_compilation_database = '.'
78 " Speedup deoplete startup time, see deoplete FAQ
79 let g:python3_host_prog = '/usr/bin/python3'
80 " deoplete requires huge startuptime. Delay loading upon first InsertEnter.
81 let g:deoplete#enable_at_startup = 0
82 autocmd InsertEnter * call deoplete#enable()
86 "au FileType markdown,mkd call pencil#init()
87 "au FileType text call pencil#init()
88 "au FileType mail call pencil#init()
89 "au FileType tex call pencil#init()
92 let g:vim_markdown_folding_disabled=1
93 let g:vim_markdown_frontmatter=1
94 let g:vim_markdown_math=1
97 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
98 " Some filetype settings
101 au BufRead,BufNewFile ~/.mutt/tmp/*mutt-* set filetype=mail
102 au BufRead,BufNewFile *.muttrc set filetype=muttrc
104 au BufRead,BufNewFile *.cls set filetype=tex
107 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
108 " Some filetype-specific settings
110 au FileType text,markdown,mail,tex,gitcommit,mediawiki,vimwiki setlocal spell
111 au FileType text,markdown,mail,gitcommit,mediawiki,vimwiki set fo+=n
113 au Filetype tex set shiftwidth=2
115 au FileType mediawiki setlocal wrap linebreak tw=0
118 au Filetype mail syn match Statement /^\s*-*\s*>8\s*-*\s*$/
119 au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/
122 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
123 " Some plugin-specific settings
125 au FileType markdown call RagtagInit()
127 let g:guesslang_langs=[ 'en_US', 'de_AT']
128 au BufReadPost * :DetectIndent
130 au BufEnter *.c* let b:fswitchlocs='reg:/lib/include/,rel:.'
131 au BufEnter *.h* let b:fswitchlocs='reg:/include/lib/,rel:.'
133 au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh'
134 au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp'
136 :let g:org_todo_keywords = [['TODO(t)', 'WAITING(w)', '|', 'DONE(d)'],
137 \ ['|', 'OBSOLETE(o)', 'WONT(n)'],
140 let g:vimwiki_list = [{'path': '~/.vimwiki/',
141 \ 'template_path': '~/.vim/vimwiki/templates',
142 \ 'template_default': 'default',
143 \ 'template_ext': '.html'}]
146 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
151 if filereadable($HOME . '/.vim/init-local.vim')
152 source ~/.vim/init-local.vim