From d6378cb335535cf2b18c4f23474884ccf8ce1a69 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 30 Sep 2017 23:47:54 +0200 Subject: Reduced flickering by avoiding automatic close of the preview window --- vimrc-full | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/vimrc-full b/vimrc-full index d859001..f798d46 100644 --- a/vimrc-full +++ b/vimrc-full @@ -72,6 +72,8 @@ set thesaurus+=~/.vim/thesaurus/php.txt set dictionary=/usr/share/dict/cracklib-small set complete+=k " make default completer respect the dictionary +set complete+=i " scan current and included files +set complete+=d " scan current and included files for defined name or macro "======================================================================================================================= " Cscope @@ -138,12 +140,12 @@ if has("gui_running") " its possible to define alternative fonts (order matters) set guifont= + set guifont+=Dejavu\ Sans\ Mono\ for\ Powerline\ Semibold set guifont+=RobotoMono\ Nerd\ Font\ Medium\ 10 set guifont+=LiterationMono\ Nerd\ Font\ Mono\ 10 set guifont+=Source\ Code\ Pro\ Semi-Bold\ 10 set guifont+=Source\ Code\ Pro\ for\ Powerline\ SemiBold\ 10 set guifont+=Droid\ Sans\ Mono\ for\ Powerline\ 10 - set guifont+=Dejavu\ Sans\ Mono\ for\ Powerline\ Semibold set guifont+=Meslo\ LG\ M\ for\ Powerline\ 10 endif @@ -254,7 +256,7 @@ endif if has("autocmd") set modeline | " set variables specific to a file, like indentation by adding a comment " set default completion function in case YouCompleteMe cannot help - set omnifunc=syntaxcomplete#Complete + " set omnifunc=syntaxcomplete#Complete augroup set_window_title " { " autocmd BufWinEnter quickfix setl statusline=%t @@ -311,6 +313,9 @@ if has("autocmd") autocmd FileType vim setlocal keywordprg=:help |. autocmd FileType c,cpp setlocal equalprg=clang-format autocmd FileType c,cpp setlocal breakat-=- + autocmd WinEnter * if &previewwindow | setlocal nonumber signcolumn=no filetype=c | endif + + " autocmd FileType c,cpp setlocal iskeyword-=_ " 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() let g:ycm_server_python_interpreter = 'python3' let g:ycm_python_binary_path = '/usr/bin/python3' " the python interpreter of choice (for code checking) let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window - let g:ycm_autoclose_preview_window_after_insertion = 1 + let g:ycm_autoclose_preview_window_after_insertion = 0 let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword let g:ycm_complete_in_comments = 1 " Completion in comments let g:ycm_complete_in_strings = 1 " Completion in string let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar - let g:ycm_min_num_of_chars_for_completion = 1 + let g:ycm_auto_trigger = 1 + 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 instead + let g:ycm_min_num_identifier_candidate_chars = 4 + + let g:ycm_max_num_identifier_candidates = 10 + let g:ycm_max_num_candidates = 50 + + let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar let g:ycm_confirm_extra_conf = 0 " security is overrated @@ -666,7 +678,7 @@ autocmd! ColorScheme * call ExtendLightlineColorTheme() let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? - + let g:ycm_show_diagnostics_ui = 1 " disable -key for YCM so that it can be used with ultisnips let g:ycm_key_list_select_completion=[] let g:ycm_key_list_previous_completion=[] @@ -764,7 +776,7 @@ function! ExtendColorTheme() syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) " use the default terminal background color as background (allows transparency) - " highlight! Normal guibg=NONE guifg=black ctermbg=NONE ctermfg=black + " highlight! Normal guibg=NONE ctermbg=NONE " highlight! NonText guibg=NONE guifg=black ctermbg=NONE ctermfg=black highlight! EndOfBuffer guifg=white ctermfg=white @@ -800,9 +812,6 @@ autocmd! ColorScheme * call ExtendColorTheme() " colorscheme PaperColor -set background=light -" set background=dark | " critical: should be set by the colorscheme, but often is not or gets used by it -" if filereadable(expand("~/.config/base16-shell/colortest")) let g:base16_shell_path="~/.config/base16-shell/scripts" endif @@ -814,6 +823,7 @@ else colorscheme base16-phd endif +set background=light " ====================================================================================================================== " TESTING: -- cgit v1.2.3