diff options
| author | Max Christian Pohle | 2017-09-30 23:47:54 +0200 |
|---|---|---|
| committer | Max Christian Pohle | 2017-09-30 23:47:54 +0200 |
| commit | d6378cb335535cf2b18c4f23474884ccf8ce1a69 (patch) | |
| tree | fba07aa12c99e46868e277e739534f24e8820076 | |
| parent | 190feb06ff6474792626cc795488ddcebd76b1c6 (diff) | |
| download | vim-d6378cb335535cf2b18c4f23474884ccf8ce1a69.tar.bz2 vim-d6378cb335535cf2b18c4f23474884ccf8ce1a69.zip | |
Reduced flickering by avoiding automatic close of the preview window
| -rw-r--r-- | vimrc-full | 28 |
1 files changed, 19 insertions, 9 deletions
| @@ -72,6 +72,8 @@ set thesaurus+=~/.vim/thesaurus/php.txt | |||
| 72 | 72 | ||
| 73 | set dictionary=/usr/share/dict/cracklib-small | 73 | set dictionary=/usr/share/dict/cracklib-small |
| 74 | set complete+=k " make default completer <C-N> respect the dictionary | 74 | set complete+=k " make default completer <C-N> respect the dictionary |
| 75 | set complete+=i " scan current and included files | ||
| 76 | set complete+=d " scan current and included files for defined name or macro | ||
| 75 | 77 | ||
| 76 | "======================================================================================================================= | 78 | "======================================================================================================================= |
| 77 | " Cscope | 79 | " Cscope |
| @@ -138,12 +140,12 @@ if has("gui_running") | |||
| 138 | 140 | ||
| 139 | " its possible to define alternative fonts (order matters) | 141 | " its possible to define alternative fonts (order matters) |
| 140 | set guifont= | 142 | set guifont= |
| 143 | set guifont+=Dejavu\ Sans\ Mono\ for\ Powerline\ Semibold | ||
| 141 | set guifont+=RobotoMono\ Nerd\ Font\ Medium\ 10 | 144 | set guifont+=RobotoMono\ Nerd\ Font\ Medium\ 10 |
| 142 | set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10 | 145 | set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10 |
| 143 | set guifont+=Source\ Code\ Pro\ Semi-Bold\ 10 | 146 | set guifont+=Source\ Code\ Pro\ Semi-Bold\ 10 |
| 144 | set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10 | 147 | set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10 |
| 145 | set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10 | 148 | set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10 |
| 146 | set guifont+=Dejavu\ Sans\ Mono\ for\ Powerline\ Semibold | ||
| 147 | set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10 | 149 | set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10 |
| 148 | endif | 150 | endif |
| 149 | 151 | ||
| @@ -254,7 +256,7 @@ endif | |||
| 254 | if has("autocmd") | 256 | if has("autocmd") |
| 255 | set modeline | " set variables specific to a file, like indentation by adding a comment | 257 | set modeline | " set variables specific to a file, like indentation by adding a comment |
| 256 | " set default completion function in case YouCompleteMe cannot help | 258 | " set default completion function in case YouCompleteMe cannot help |
| 257 | set omnifunc=syntaxcomplete#Complete | 259 | " set omnifunc=syntaxcomplete#Complete |
| 258 | 260 | ||
| 259 | augroup set_window_title " { | 261 | augroup set_window_title " { |
| 260 | " autocmd BufWinEnter quickfix setl statusline=%t | 262 | " autocmd BufWinEnter quickfix setl statusline=%t |
| @@ -311,6 +313,9 @@ if has("autocmd") | |||
| 311 | autocmd FileType vim setlocal keywordprg=:help |. | 313 | autocmd FileType vim setlocal keywordprg=:help |. |
| 312 | autocmd FileType c,cpp setlocal equalprg=clang-format | 314 | autocmd FileType c,cpp setlocal equalprg=clang-format |
| 313 | autocmd FileType c,cpp setlocal breakat-=- | 315 | autocmd FileType c,cpp setlocal breakat-=- |
| 316 | autocmd WinEnter * if &previewwindow | setlocal nonumber signcolumn=no filetype=c | endif | ||
| 317 | |||
| 318 | |||
| 314 | " autocmd FileType c,cpp setlocal iskeyword-=_ | 319 | " autocmd FileType c,cpp setlocal iskeyword-=_ |
| 315 | 320 | ||
| 316 | " the following helps to make file=/etc/something work with gf, but disallows filenames with an equal sign in them | 321 | " the following helps to make file=/etc/something work with gf, but disallows filenames with an equal sign in them |
| @@ -651,13 +656,20 @@ autocmd! ColorScheme * call ExtendLightlineColorTheme() | |||
| 651 | let g:ycm_server_python_interpreter = 'python3' | 656 | let g:ycm_server_python_interpreter = 'python3' |
| 652 | let g:ycm_python_binary_path = '/usr/bin/python3' " the python interpreter of choice (for code checking) | 657 | let g:ycm_python_binary_path = '/usr/bin/python3' " the python interpreter of choice (for code checking) |
| 653 | let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window | 658 | let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window |
| 654 | let g:ycm_autoclose_preview_window_after_insertion = 1 | 659 | let g:ycm_autoclose_preview_window_after_insertion = 0 |
| 655 | let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file | 660 | let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file |
| 656 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword | 661 | let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword |
| 657 | let g:ycm_complete_in_comments = 1 " Completion in comments | 662 | let g:ycm_complete_in_comments = 1 " Completion in comments |
| 658 | let g:ycm_complete_in_strings = 1 " Completion in string | 663 | let g:ycm_complete_in_strings = 1 " Completion in string |
| 659 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar | 664 | let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar |
| 660 | let g:ycm_min_num_of_chars_for_completion = 1 | 665 | let g:ycm_auto_trigger = 1 |
| 666 | let g:ycm_min_num_of_chars_for_completion = 6 " we normally avoid identifier based completion, it just helps with long words. Use semantic completions with <C-Space> instead | ||
| 667 | let g:ycm_min_num_identifier_candidate_chars = 4 | ||
| 668 | |||
| 669 | let g:ycm_max_num_identifier_candidates = 10 | ||
| 670 | let g:ycm_max_num_candidates = 50 | ||
| 671 | |||
| 672 | |||
| 661 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure | 673 | let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure |
| 662 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar | 674 | let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar |
| 663 | let g:ycm_confirm_extra_conf = 0 " security is overrated | 675 | let g:ycm_confirm_extra_conf = 0 " security is overrated |
| @@ -666,7 +678,7 @@ autocmd! ColorScheme * call ExtendLightlineColorTheme() | |||
| 666 | let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' | 678 | let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' |
| 667 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } | 679 | let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } |
| 668 | " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? | 680 | " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? |
| 669 | 681 | let g:ycm_show_diagnostics_ui = 1 | |
| 670 | " disable <tab>-key for YCM so that it can be used with ultisnips | 682 | " disable <tab>-key for YCM so that it can be used with ultisnips |
| 671 | let g:ycm_key_list_select_completion=[] | 683 | let g:ycm_key_list_select_completion=[] |
| 672 | let g:ycm_key_list_previous_completion=[] | 684 | let g:ycm_key_list_previous_completion=[] |
| @@ -764,7 +776,7 @@ function! ExtendColorTheme() | |||
| 764 | syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) | 776 | syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) |
| 765 | 777 | ||
| 766 | " use the default terminal background color as background (allows transparency) | 778 | " use the default terminal background color as background (allows transparency) |
| 767 | " highlight! Normal guibg=NONE guifg=black ctermbg=NONE ctermfg=black | 779 | " highlight! Normal guibg=NONE ctermbg=NONE |
| 768 | " highlight! NonText guibg=NONE guifg=black ctermbg=NONE ctermfg=black | 780 | " highlight! NonText guibg=NONE guifg=black ctermbg=NONE ctermfg=black |
| 769 | highlight! EndOfBuffer guifg=white ctermfg=white | 781 | highlight! EndOfBuffer guifg=white ctermfg=white |
| 770 | 782 | ||
| @@ -800,9 +812,6 @@ autocmd! ColorScheme * call ExtendColorTheme() | |||
| 800 | 812 | ||
| 801 | 813 | ||
| 802 | " colorscheme PaperColor | 814 | " colorscheme PaperColor |
| 803 | set background=light | ||
| 804 | " set background=dark | " critical: should be set by the colorscheme, but often is not or gets used by it | ||
| 805 | " | ||
| 806 | if filereadable(expand("~/.config/base16-shell/colortest")) | 815 | if filereadable(expand("~/.config/base16-shell/colortest")) |
| 807 | let g:base16_shell_path="~/.config/base16-shell/scripts" | 816 | let g:base16_shell_path="~/.config/base16-shell/scripts" |
| 808 | endif | 817 | endif |
| @@ -814,6 +823,7 @@ else | |||
| 814 | colorscheme base16-phd | 823 | colorscheme base16-phd |
| 815 | endif | 824 | endif |
| 816 | 825 | ||
| 826 | set background=light | ||
| 817 | 827 | ||
| 818 | " ====================================================================================================================== | 828 | " ====================================================================================================================== |
| 819 | " TESTING: | 829 | " TESTING: |
