aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-04-28 15:25:51 +0200
committerMax Christian Pohle2017-04-28 15:25:51 +0200
commit2de245f6cee6463943d12b29e6ef8ce260568c95 (patch)
tree742d8f3e20e0a114ea7fadc103a253f675b5ea00
parentea7f452b20582056e72bde7c5d0ad14633d736cc (diff)
downloadvim-karlmarks-2de245f6cee6463943d12b29e6ef8ce260568c95.tar.bz2
vim-karlmarks-2de245f6cee6463943d12b29e6ef8ce260568c95.zip
Mainly whitespace and indentation fixes
-rw-r--r--vimrc29
1 files changed, 20 insertions, 9 deletions
diff --git a/vimrc b/vimrc
index ab22a28..78f34a1 100644
--- a/vimrc
+++ b/vimrc
@@ -17,6 +17,7 @@ Plug 'jlanzarotta/bufexplorer'
17" Plug 'wting/gitsessions.vim' 17" Plug 'wting/gitsessions.vim'
18Plug 'rkitover/vimpager' 18Plug 'rkitover/vimpager'
19Plug 'mtth/scratch.vim' 19Plug 'mtth/scratch.vim'
20Plug 'airblade/vim-rooter' | " makes :lcd changes to projects (git-)root (code-completion, gf, grep, find)
20 21
21nnoremap <F12> :ToggleBufExplorer<CR> 22nnoremap <F12> :ToggleBufExplorer<CR>
22nnoremap <F2> :ScratchPreview<CR> 23nnoremap <F2> :ScratchPreview<CR>
@@ -123,6 +124,8 @@ nnoremap <F9> :TagbarToggle<CR>| " bind TagBar to Hotkey Ct
123" Autocompleter: =====================================. 124" Autocompleter: =====================================.
124Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... 125Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/...
125Plug 'Valloric/YouCompleteMe' 126Plug 'Valloric/YouCompleteMe'
127let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window
128let g:ycm_autoclose_preview_window_after_insertion = 1
126let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file 129let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
127let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword 130let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
128let g:ycm_complete_in_comments = 1 " Completion in comments 131let g:ycm_complete_in_comments = 1 " Completion in comments
@@ -134,7 +137,9 @@ let g:ycm_warning_symbol = '➔' " insert this as a warni
134let g:ycm_confirm_extra_conf = 0 " security is overrated 137let g:ycm_confirm_extra_conf = 0 " security is overrated
135let g:ycm_key_list_select_completion = ['<Down>'] 138let g:ycm_key_list_select_completion = ['<Down>']
136let g:ycm_key_list_previous_completion = ['<Up>'] 139let g:ycm_key_list_previous_completion = ['<Up>']
137let g:ycm_global_ycm_extra_conf = '~/src/.ycm_extra_conf.py' 140let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py'
141let g:ycm_semantic_triggers = { 'c': [ 're!.' ] }
142" 'cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..' can be used to generate a .ycm-extra.conf compatible json file
138" disable <tab>-key for YCM so that it can be used with ultisnips 143" disable <tab>-key for YCM so that it can be used with ultisnips
139" let g:ycm_key_list_select_completion=[] 144" let g:ycm_key_list_select_completion=[]
140" let g:ycm_key_list_previous_completion=[] 145" let g:ycm_key_list_previous_completion=[]
@@ -204,6 +209,7 @@ Plug 'SirVer/ultisnips' " replaces loremipsum (and
204" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values) 209" Plug 'tpope/vim-characterize' | " normal mode: make ga show character names of Unicode chars (ga shows hex and dec values)
205" Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround 210" Plug 'tpope/vim-repeat' | " lets . (dot) repeat plugin macros as well, specifically vim-surround
206 211
212
207call plug#end() | " all plugins are getting loaded on this line, don't remove! 213call plug#end() | " all plugins are getting loaded on this line, don't remove!
208 214
209filetype on 215filetype on
@@ -297,18 +303,23 @@ set ts=4 sts=4 sw=4 expandtab | " better done with a modeline
297set ttimeoutlen=10 | " set esc key timeout in ms- 303set ttimeoutlen=10 | " set esc key timeout in ms-
298set updatetime=1000 | " updates the screen more often 304set updatetime=1000 | " updates the screen more often
299set writedelay=0 305set writedelay=0
306set lcs+=space:· | " local space char
300 307
301if has("multi_byte") 308if has("multi_byte")
302 scriptencoding utf-8 | " tell vim that we are using utf-8 here 309 scriptencoding utf-8 | " tell vim that we are using utf-8 here
303 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) 310 set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below)
304 set termencoding=&encoding | " once we use special chars we assume everybody uses a terminal supporting those 311 set termencoding=&encoding | " once we use special chars we assume everybody uses a terminal supporting those
305 set listchars=eol:↲ | " symbols used when using :set list (which displays non-printable chars) 312
313 set listchars= | " initialize empty listchars
306 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) 314 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
307 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars) 315 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
316
308 set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars) 317 set listchars+=tab:▸\ | " symbols used when using :set list (which displays non-printable chars)
309 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) 318 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
310 set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) 319 set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
320 " set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars)
311 set showbreak+=› | " symbol used in the beginning of a wrapped line 321 set showbreak+=› | " symbol used in the beginning of a wrapped line
322 set list
312end 323end
313 324
314if has("gui_running") 325if has("gui_running")
@@ -343,10 +354,10 @@ if has("autocmd")
343 autocmd BufWritePost $MYVIMRC source $MYVIMRC 354 autocmd BufWritePost $MYVIMRC source $MYVIMRC
344 augroup END " } 355 augroup END " }
345 356
346 " augroup remove_whitespaces " { 357 augroup extra_whitespace
347 " " automatically remove trailing white spaces on save.. 358 highlight ExtraWhitespace ctermbg=red guibg=red
348 " autocmd BufWritePre * %s/\s\+$//e 359 syn match ExtraWhitespace /\s\+$/
349 " augroup END " } 360 augroup END
350 361
351 augroup set_window_title " { 362 augroup set_window_title " {
352 " autocmd BufWinEnter quickfix setl statusline=%t 363 " autocmd BufWinEnter quickfix setl statusline=%t
@@ -370,8 +381,8 @@ if has("autocmd")
370 " set cursorline | " use setcursorline in order to highlight non printable chars in the current line 381 " set cursorline | " use setcursorline in order to highlight non printable chars in the current line
371 autocmd ColorScheme * highlight normal ctermbg=NONE 382 autocmd ColorScheme * highlight normal ctermbg=NONE
372 " set list | " shows unprinable characters in the current line 383 " set list | " shows unprinable characters in the current line
373 autocmd ColorScheme * highlight NonText ctermbg=NONE ctermfg=0 gui=bold guifg=NONE 384 " autocmd ColorScheme * highlight NonText ctermbg=NONE ctermfg=0 gui=bold guifg=NONE
374 autocmd ColorScheme * highlight SpecialKey ctermbg=NONE ctermfg=0 gui=bold guifg=NONE 385 " autocmd ColorScheme * highlight SpecialKey ctermbg=NONE ctermfg=0 gui=bold guifg=NONE
375 " autocmd ColorScheme * highlight CursorLineNr term=bold ctermbg=NONE ctermfg=0 gui=bold guifg=Yellow 386 " autocmd ColorScheme * highlight CursorLineNr term=bold ctermbg=NONE ctermfg=0 gui=bold guifg=Yellow
376 " 387 "
377 " 388 "
..