diff options
author | Max Christian Pohle | 2017-05-07 17:40:07 +0200 |
---|---|---|
committer | Max Christian Pohle | 2017-05-07 17:40:07 +0200 |
commit | 4a6d3efdcd52a7e358af30027acf6950010e26be (patch) | |
tree | c9a4106078a541e854e034efd8325d34c22a8df8 | |
parent | 5ae3f6fb84f1027a3f017d47e60e1d5cdd0e7fb2 (diff) | |
download | vim-karlmarks-4a6d3efdcd52a7e358af30027acf6950010e26be.tar.bz2 vim-karlmarks-4a6d3efdcd52a7e358af30027acf6950010e26be.zip |
Many fine grained improvements
-rw-r--r-- | vimrc-full | 63 |
1 files changed, 50 insertions, 13 deletions
@@ -36,7 +36,7 @@ Plug 'vim-airline/vim-airline' | " beautification of the | |||
36 | set laststatus=2 | " required by AirLine, without status line does not appear until a window split | 36 | set laststatus=2 | " required by AirLine, without status line does not appear until a window split |
37 | let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'tagbar', 'whitespace', 'ycm'] | 37 | let g:airline_extensions = ['tabline', 'branch', 'syntastic', 'tagbar', 'whitespace', 'ycm'] |
38 | let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] | 38 | let b:airline_whitespace_checks = ['indent', 'trailing', 'long', 'mixed-indent-file'] |
39 | let g:airline_section_c = "" | " was: %F | 39 | " let g:airline_section_c = "" | " was: %F |
40 | let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend | 40 | let g:airline#extensions#tagbar#flags = 'f' | " even though the airline extension is off this controls :h tagbar-extend |
41 | let g:airline#extensions#tabline#left_sep = ' ' | 41 | let g:airline#extensions#tabline#left_sep = ' ' |
42 | let g:airline#extensions#tabline#left_alt_sep = ' | ' | 42 | let g:airline#extensions#tabline#left_alt_sep = ' | ' |
@@ -48,11 +48,12 @@ let g:airline#extensions#tabline#show_tabs = 0 | | |||
48 | let g:airline#extensions#tagbar#enabled = 0 | | 48 | let g:airline#extensions#tagbar#enabled = 0 | |
49 | let g:airline#extensions#whitespace#enabled = 1 | | 49 | let g:airline#extensions#whitespace#enabled = 1 | |
50 | let g:airline#extensions#wordcount#enabled = 0 | | 50 | let g:airline#extensions#wordcount#enabled = 0 | |
51 | let g:airline_detect_modified = 0 | | 51 | let g:airline_detect_modified = 1 | |
52 | let g:airline_detect_paste = 0 | | 52 | let g:airline_detect_paste = 0 | |
53 | let g:airline_exclude_preview = 0 | | 53 | let g:airline_exclude_preview = 1 | |
54 | let g:airline_inactive_collapse = 1 | | 54 | let g:airline_inactive_collapse = 1 | |
55 | let g:airline_powerline_fonts = 1 | | 55 | let g:airline_powerline_fonts = 1 | |
56 | let g:airline_skip_empty_sections = 1 | | ||
56 | " AIRLINE_Theme: | 57 | " AIRLINE_Theme: |
57 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme | 58 | Plug 'vim-airline/vim-airline-themes' | " airline themes to match any light and dark terminal using :AirlineTheme |
58 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses | 59 | let g:airline_theme='base16' | " specifies which colorscheme should airline uses |
@@ -61,7 +62,7 @@ let g:airline_theme='base16' | " specifies which colorsc | |||
61 | 62 | ||
62 | 63 | ||
63 | " NERDTree: replaces NetRW, as long as it has so many bugs | 64 | " NERDTree: replaces NetRW, as long as it has so many bugs |
64 | Plug 'scrooloose/nerdtree' | " | 65 | Plug 'scrooloose/nerdtree' | " |
65 | let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use <m> to create files in that included directory | 66 | let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use <m> to create files in that included directory |
66 | let NERDTreeShowBookmarks = 1 | " show bookmarks by default (when opening for the first time) | 67 | let NERDTreeShowBookmarks = 1 | " show bookmarks by default (when opening for the first time) |
67 | let NERDTreeIgnore = ['\.aux$'] | 68 | let NERDTreeIgnore = ['\.aux$'] |
@@ -126,6 +127,9 @@ let g:ycm_key_list_select_completion = ['<Down>'] | |||
126 | let g:ycm_key_list_previous_completion = ['<Up>'] | 127 | let g:ycm_key_list_previous_completion = ['<Up>'] |
127 | let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py' | 128 | let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py' |
128 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } | 129 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } |
130 | let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking) | ||
131 | |||
132 | nnoremap <F7> :YcmCompleter FixIt<CR> | ||
129 | " disable <tab>-key for YCM so that it can be used with ultisnips | 133 | " disable <tab>-key for YCM so that it can be used with ultisnips |
130 | " let g:ycm_key_list_select_completion=[] | 134 | " let g:ycm_key_list_select_completion=[] |
131 | " let g:ycm_key_list_previous_completion=[] | 135 | " let g:ycm_key_list_previous_completion=[] |
@@ -243,11 +247,16 @@ set nocursorcolumn | " turn visual cursor column off (improves perfor | |||
243 | set nocursorline | " turn visual cursor line off (improves performance) | 247 | set nocursorline | " turn visual cursor line off (improves performance) |
244 | set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers | 248 | set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers |
245 | set nofoldenable | " disable code folding. I hate code folding | 249 | set nofoldenable | " disable code folding. I hate code folding |
246 | set foldcolumn=4 | " if code folding gets used display it in the clutter bar, where line numbers live | 250 | set foldmethod=syntax | " foldlevel: syntax, indent, manual |
251 | set foldcolumn=1 | " if code folding gets used display it in the clutter bar, where line numbers live | ||
252 | set foldclose=all | " automatically fold, when the cursor leaves the folded area | ||
253 | set foldopen=all | " unfold when cursor moves into the closed fold | ||
254 | set foldtext=Foldtext() | " | ||
247 | set relativenumber | " relative line numbers can speed up navigation | 255 | set relativenumber | " relative line numbers can speed up navigation |
248 | set noshowmode | " because we are using some powerline derivat | 256 | set noshowmode | " because we are using some powerline derivat |
249 | set nostartofline | " when scrolling: do not move the cursor to column 1 | 257 | set nostartofline | " when scrolling: do not move the cursor to column 1 |
250 | set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals | 258 | set notimeout ttimeout | " improves performance but is known to cause problems on slow terminals |
259 | set ttimeoutlen=10 | " set esc key timeout in ms- | ||
251 | set nowrap | " but do not (by default) wrap long lines around | 260 | set nowrap | " but do not (by default) wrap long lines around |
252 | set number | " turn line numbers on/off (performance decreases when they are shown) | 261 | set number | " turn line numbers on/off (performance decreases when they are shown) |
253 | set pumheight=8 | " Determines the maximum number of items to show in the popup menu for | 262 | set pumheight=8 | " Determines the maximum number of items to show in the popup menu for |
@@ -265,9 +274,8 @@ set winminwidth=30 | " (and all other windows, so TODO: watch out) | |||
265 | set tags+=../tags | 274 | set tags+=../tags |
266 | " set textwidth=100 | " line length (80 used to be default, but...) | 275 | " set textwidth=100 | " line length (80 used to be default, but...) |
267 | set textwidth=120 | " better done with modeline | 276 | set textwidth=120 | " better done with modeline |
268 | set colorcolumn=120 | " better done with modeline | 277 | set colorcolumn= | " not used, because we have a :match directive for textwidth |
269 | set ts=4 sts=4 sw=4 expandtab | " better done with a modeline | 278 | set ts=4 sts=4 sw=4 expandtab | " better done with a modeline |
270 | set ttimeoutlen=10 | " set esc key timeout in ms- | ||
271 | set updatetime=1000 | " updates the screen more often | 279 | set updatetime=1000 | " updates the screen more often |
272 | set writedelay=0 | 280 | set writedelay=0 |
273 | set lcs+=space:· | " local space char | 281 | set lcs+=space:· | " local space char |
@@ -276,11 +284,17 @@ set lcs+=space:· | " local space char | |||
276 | " set term=xtermc | " may be required on solaris | 284 | " set term=xtermc | " may be required on solaris |
277 | set t_Co=256 | " required on some ssh sessions | 285 | set t_Co=256 | " required on some ssh sessions |
278 | let &t_Co=256 | 286 | let &t_Co=256 |
279 | set background=light | " hint how the terminal background looks like | 287 | " set termguicolors |
288 | " set background=light | " hint how the terminal background looks like | ||
289 | |||
290 | " uses the default terminal background color as background (allows transparency) | ||
291 | " autocmd Colorscheme * set background=dark | ||
292 | |||
280 | 293 | ||
281 | " set termguicolors | 294 | " set termguicolors |
282 | let base16colorspace=256 | 295 | let base16colorspace=256 |
283 | if filereadable(expand("~/.vimrc_background")) | 296 | if filereadable(expand("~/.vimrc_background")) |
297 | set background=light | ||
284 | source ~/.vimrc_background | 298 | source ~/.vimrc_background |
285 | else | 299 | else |
286 | colorscheme base16-phd | 300 | colorscheme base16-phd |
@@ -291,11 +305,26 @@ else | |||
291 | " colorscheme base16-default-dark | 305 | " colorscheme base16-default-dark |
292 | endif | 306 | endif |
293 | 307 | ||
294 | highlight normal ctermbg=NONE | " uses the default terminal background color as background (allows transparency) | 308 | " highlight Normal ctermbg=NONE ctermfg=white |
295 | highlight CursorLineNr ctermbg=black ctermfg=NONE | 309 | highlight NonText ctermbg=NONE ctermfg=white |
310 | highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE | ||
311 | highlight! Pmenu ctermbg=LightYellow ctermfg=blue cterm=italic | ||
312 | highlight! MoreMsg cterm=inverse | ||
313 | highlight! link Folded LineNr | ||
314 | highlight Cursor guibg=green | ||
315 | highlight! link VertSplit LineNr | ||
316 | execute ':match ColorColumn /\%>'.&textwidth.'v./' | ||
317 | |||
318 | |||
319 | set fillchars+=fold:\ | " | ||
320 | set fillchars+=vert:\│ | " cool vertical split char | ||
321 | " set fillchars+=stlnc:\― | " | ||
322 | |||
323 | |||
324 | |||
325 | |||
296 | 326 | ||
297 | 327 | ||
298 | highlight Cursor guibg=green | ||
299 | " let &t_EI .= "\<Esc>[0 q" | 328 | " let &t_EI .= "\<Esc>[0 q" |
300 | " let &t_SI = "\<Esc>]12;green\x7" | 329 | " let &t_SI = "\<Esc>]12;green\x7" |
301 | if has('autocmd') | 330 | if has('autocmd') |
@@ -314,7 +343,7 @@ if has("multi_byte") | |||
314 | set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) | 343 | set listchars+=extends:» | " 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) | 344 | set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars) |
316 | 345 | ||
317 | set listchars+=tab:˲\ | " symbols used when using :set list (which displays non-printable chars) | 346 | set listchars+=tab:⮁\ | " 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) | 347 | set listchars+=trail:· | " 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) | 348 | " 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) | 349 | " set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) |
@@ -338,7 +367,7 @@ if has('cscope') " compiled with cscope support? | |||
338 | cnoreabbrev csh cs help | 367 | cnoreabbrev csh cs help |
339 | 368 | ||
340 | command! -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src | 369 | command! -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src |
341 | endif | 370 | endif |
342 | 371 | ||
343 | " GUI_VERSION: | 372 | " GUI_VERSION: |
344 | if has("gui_running") | 373 | if has("gui_running") |
@@ -581,3 +610,11 @@ let g:netrw_winsize = 20 | " window size in percent | |||
581 | " \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | 610 | " \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, |
582 | " \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } | 611 | " \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } |
583 | " \ } | 612 | " \ } |
613 | |||
614 | " highlight! link airline_warning Error | ||
615 | " autocmd User AirlineAfterTheme highlight! airline_warning ctermbg=NONE | ||
616 | " autocmd AirlineAfterTheme highlight! airline_warning ctermbg=NONE | ||
617 | " autocmd BufEnter * highlight! link airline_warning Error | ||
618 | |||
619 | |||
620 | " autocmd BufEnter * lcd %:p:h | " Plugin vim-rooter get used instead (which is much more sane as well) | ||