From bfe2f636a6d53e8d0371550acb4666a6e243d40c Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Tue, 9 May 2017 00:31:47 +0200 Subject: Performance optimization with postponed loading --- vimrc-full | 81 ++++++++++++++++++++++++++------------------------------------ 1 file changed, 34 insertions(+), 47 deletions(-) (limited to 'vimrc-full') diff --git a/vimrc-full b/vimrc-full index 2b68c73..ac98f11 100644 --- a/vimrc-full +++ b/vimrc-full @@ -1,7 +1,7 @@ " vim: tabstop=2 softtabstop=2 shiftwidth=2 textwidth=160 set t_Co=256 | " required on some ssh sessions -let &t_Co=256 | " +let &t_Co=256 | " " set background=light | " " set term=xtermc | " may be required on solaris " set term=xterm-256color @@ -79,6 +79,9 @@ Plug 'scrooloose/nerdtree' | " let NERDTreeCascadeSingleChildDir = 0 | " I don't get how one can use to create files in that included directory let NERDTreeShowBookmarks = 1 | " show bookmarks by default (when opening for the first time) let NERDTreeIgnore = ['\.aux$'] +let NERDTreeMinimalUI = 1 +let NERDTreeWinSize = 40 +let NERDTreeHiddenFirst = 1 " depending on if NERDTree has the focus: nnoremap @@ -121,8 +124,22 @@ nnoremap :TagbarToggle| " bind TagBar to Hotkey Ct " Autocompleter: =====================================. -Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... -Plug 'Valloric/YouCompleteMe' +" +" ULTISNIPS: code snippet ============================================================================================== +Plug 'honza/vim-snippets', {'on': [], 'for':['ultisnips']} " dependency of ultisnips (see below) +Plug 'SirVer/ultisnips', {'on': []} " replaces loremipsum (and many more) +"let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +"let g:UltiSnipsJumpForwardTrigger = ''| " \ +"let g:UltiSnipsJumpBackwardTrigger = ''| " \ +"let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary +"let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +"let g:UltiSnipsJumpForwardTrigger = ''| " \ +"let g:UltiSnipsJumpBackwardTrigger = ''| " \ +"let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary +" +" YouCompleteMe: ====================================================================================================== +" Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... +Plug 'Valloric/YouCompleteMe', { 'on': [] } let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window let g:ycm_autoclose_preview_window_after_insertion = 1 let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file @@ -140,7 +157,11 @@ let g:ycm_global_ycm_extra_conf = '~/src/ycm_extra_conf.py' let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } let g:ycm_python_binary_path = 'python' " the python interpreter of choice (for code checking) -nnoremap :YcmCompleter FixIt +autocmd InsertEnter * call plug#load('vim-snippets', 'ultisnips', 'YouCompleteMe') + \| call youcompleteme#Enable() + \| nnoremap :YcmCompleter FixIt + + " 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=[] @@ -178,31 +199,6 @@ let g:pymode_rope = 0 " https://github.com/davidhalter/jedi- " let g:pymode_options_max_line_length = 120 " let g:syntastic_python_flake8_args='--ignore=F821,E302,E501,E241,E301' -" ULTISNIPS: code snippet ============================================================================================== -Plug 'honza/vim-snippets' " dependency of ultisnips (see below) -Plug 'SirVer/ultisnips' " replaces loremipsum (and many more) -"let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -"let g:UltiSnipsJumpForwardTrigger = ''| " \ -"let g:UltiSnipsJumpBackwardTrigger = ''| " \ -"let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary -"let g:UltiSnipsExpandTrigger = ''| " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -"let g:UltiSnipsJumpForwardTrigger = ''| " \ -"let g:UltiSnipsJumpBackwardTrigger = ''| " \ -"let g:UltiSnipsListSnippets = ''| " YouCompleteMe includes those, so this isn't necessary -" UltiSnips triggering -" let g:UltiSnipsExpandTrigger = "" -" let g:ulti_expand_or_jump_res = 0 -" function ExpandSnippetOrCarriageReturn() -" let snippet = UltiSnips#ExpandSnippetOrJump() -" if g:ulti_expand_or_jump_res > 0 -" return snippet -" else -" return "\" -" endif -" endfunction -" inoremap pumvisible() ? "\=ExpandSnippetOrCarriageReturn()\" : "\" -" set completeopt-=preview -" let g:UltiSnipsEditSplit = 'vertical' @@ -211,12 +207,17 @@ call plug#end() | " all plugins are gettin " END: LOADING PLUGINS - " COLORSCHEME: " uses the default terminal background color as background (allows transparency) function! ExtendColorTheme() - set background=light - let g:colors_name="" + " let g:colors_name="" + " set background=light + filetype on + filetype plugin on + filetype indent on + + syntax on | " enable syntax highlighting + syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) " highlight Normal ctermbg=NONE ctermfg=black highlight! CursorLineNr cterm=inverse | " ctermbg=black ctermfg=NONE @@ -229,25 +230,16 @@ function! ExtendColorTheme() highlight! Cursor guibg=green ctermbg=yellow highlight! link VertSplit LineNr highlight! SpellBad ctermbg=none - - syntax on | " enable syntax highlighting - syntax sync minlines=60 | " how many preceding lines will be parsed? (has performance impact) endfunction autocmd ColorScheme * call ExtendColorTheme() - -let g:base16_shell_path="/home/max/.config/base16-shell/scrips/" +let g:base16_shell_path="~/.config/base16-shell/scripts" let base16colorspace=256 if filereadable(expand("~/.vimrc_background")) source ~/.vimrc_background else colorscheme base16-phd -" colorscheme base16-embers -" colorscheme base16-flat -" colorscheme base16-summerfruit-dark -" colorscheme base16-tommorow -" colorscheme base16-default-dark endif @@ -256,9 +248,6 @@ endif "======================================================================================================================= " GENERAL: "======================================================================================================================= -filetype on -filetype plugin on -filetype indent on "======================================================================================================================= @@ -464,8 +453,6 @@ if has("autocmd") \ vat:'<,'>!tidy -xml --wrap 0 --sort-attributes alpha 2>/dev/nullvat= augroup END - - augroup ChangeIcon "if filereadable("/usr/bin/xseticon") "if filereadable("~/.vim/nvim.png") -- cgit v1.2.3