From 0d8c92ee1ab4b5e49c95ad04b860d1897884585d Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Mon, 5 Dec 2016 21:31:02 +0100 Subject: [PATCH] =?UTF-8?q?Neocomplete=20=E2=86=92=20YouCompleteMe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not that tested, but at least it show SOMETHING, Neocomplete used to be dead for a looong time. --- .tern-config | 1 + scripts/installPreferences.sh | 6 +++ scripts/proxy.sh | 1 + vimrc | 88 +---------------------------------- 4 files changed, 9 insertions(+), 87 deletions(-) create mode 100644 .tern-config diff --git a/.tern-config b/.tern-config new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.tern-config @@ -0,0 +1 @@ +{} diff --git a/scripts/installPreferences.sh b/scripts/installPreferences.sh index 27b8015..a46bef5 100755 --- a/scripts/installPreferences.sh +++ b/scripts/installPreferences.sh @@ -157,6 +157,12 @@ function install-preferences { git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim vim +PluginInstall +qall + # YouCompleteMe (vim plugin) + if [ $DEBIAN ]; then + inst build-essential cmake python-dev python3-dev + fi + $HOME/.vim/bundle/YouCompleteMe/install.sh --clang-completer --tern-completer + # Dev if [ $DEBIAN ]; then inst build-essential diff --git a/scripts/proxy.sh b/scripts/proxy.sh index 9f15429..16ed33e 100755 --- a/scripts/proxy.sh +++ b/scripts/proxy.sh @@ -40,4 +40,5 @@ function proxy_off { unset rsync_proxy echo -e "Proxy removed" } +alias po=proxy_off diff --git a/vimrc b/vimrc index 972d0b9..79e7e37 100644 --- a/vimrc +++ b/vimrc @@ -14,7 +14,6 @@ Plugin 'gmarik/Vundle.vim' Plugin 'L9' Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} Plugin 'altercation/vim-colors-solarized' -Bundle 'Shougo/neocomplete' Bundle 'Shougo/neosnippet' Bundle 'Shougo/neosnippet-snippets' Plugin 'tpope/vim-surround' @@ -35,6 +34,7 @@ Plugin 'majutsushi/tagbar' "Plugin 'gilligan/vim-lldb' Plugin 'wellle/targets.vim' Plugin 'Chiel92/vim-autoformat' +Plugin 'Valloric/YouCompleteMe' call vundle#end() " required filetype plugin indent on " required @@ -47,92 +47,6 @@ let g:ctrlp_custom_ignore = { \ 'link': 'SOME_BAD_SYMBOLIC_LINKS', \ } -""" NEOCOMPLETE """ - -"Note: This option must set it in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)! -" Disable AutoComplPop. -let g:acp_enableAtStartup = 0 -" Use neocomplete. -let g:neocomplete#enable_at_startup = 0 -" Use smartcase. -let g:neocomplete#enable_smart_case = 1 -" Set minimum syntax keyword length. -let g:neocomplete#sources#syntax#min_keyword_length = 3 -let g:neocomplete#lock_buffer_name_pattern = '\*ku\*' - -" Define dictionary. -let g:neocomplete#sources#dictionary#dictionaries = { - \ 'default' : '', - \ 'vimshell' : $HOME.'/.vimshell_hist', - \ 'scheme' : $HOME.'/.gosh_completions' - \ } - -" Define keyword. -if !exists('g:neocomplete#keyword_patterns') - let g:neocomplete#keyword_patterns = {} -endif -let g:neocomplete#keyword_patterns['default'] = '\h\w*' - -" Plugin key-mappings. -inoremap neocomplete#undo_completion() -inoremap neocomplete#complete_common_string() - -" Recommended key-mappings. -" : close popup and save indent. -inoremap =my_cr_function() -function! s:my_cr_function() - return neocomplete#close_popup() . "\" - " For no inserting key. - "return pumvisible() ? neocomplete#close_popup() : "\" -endfunction -" : completion. -inoremap pumvisible() ? "\" : "\" -" , : close popup and delete backword char. -inoremap neocomplete#smart_close_popup()."\" -inoremap neocomplete#smart_close_popup()."\" -inoremap neocomplete#close_popup() -inoremap neocomplete#cancel_popup() -" Close popup by . -"inoremap pumvisible() ? neocomplete#close_popup() : "\" - -" For cursor moving in insert mode(Not recommended) -"inoremap neocomplete#close_popup() . "\" -"inoremap neocomplete#close_popup() . "\" -"inoremap neocomplete#close_popup() . "\" -"inoremap neocomplete#close_popup() . "\" -" Or set this. -"let g:neocomplete#enable_cursor_hold_i = 1 -" Or set this. -"let g:neocomplete#enable_insert_char_pre = 1 - -" AutoComplPop like behavior. -"let g:neocomplete#enable_auto_select = 1 - -" Shell like behavior(not recommended). -"set completeopt+=longest -"let g:neocomplete#enable_auto_select = 1 -"let g:neocomplete#disable_auto_complete = 1 -"inoremap pumvisible() ? "\" : "\\" - -" Enable omni completion. -autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS -autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags -autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS -autocmd FileType python setlocal omnifunc=pythoncomplete#Complete -autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags - -" Enable heavy omni completion. -if !exists('g:neocomplete#sources#omni#input_patterns') - let g:neocomplete#sources#omni#input_patterns = {} -endif -"let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::' -"let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' -"let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' - -" For perlomni.vim setting. -" https://github.com/c9s/perlomni.vim -let g:neocomplete#sources#omni#input_patterns.perl = '\h\w*->\h\w*\|\h\w*::' - """ SYNTASTIC """ set statusline+=%#warningmsg#