From 42f3e8bf1c806867d09fd2d34ec1a82943422d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 20 Feb 2018 15:35:26 +0100 Subject: autocomplete and snippets wip --- vimrc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/vimrc b/vimrc index 016006a..a9a222d 100644 --- a/vimrc +++ b/vimrc @@ -32,6 +32,10 @@ Plugin 'scrooloose/nerdtree' " Plugin 'tpope/vim-haml' " Plugin 'tpope/vim-markdown' " Plugin 'vim-scripts/javacomplete' +Plugin 'Shougo/deoplete.nvim' +Plugin 'Shougo/neosnippet' +Plugin 'Shougo/neosnippet-snippets' + call vundle#end() " required filetype plugin indent on " required @@ -64,8 +68,6 @@ set backspace=indent,eol,start " allow backspacing over everything in insert mo " jump to definition, to jump back to the call set tags+=./.tags;/ nmap g -" auto completion -inoremap " Theme ---------------------------------------------------------------------- @@ -99,6 +101,13 @@ nmap e :CtrlP nmap ep :CtrlPBuffer nmap em :CtrlPMixed +" Autocomplete +let g:deoplete#enable_at_startup = 1 +" let g:neosnippet#disable_runtime_snippets +" let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets' +imap (neosnippet_expand_or_jump) +smap (neosnippet_expand_or_jump) +xmap (neosnippet_expand_target) " localvimrc ----------------------------------------------------------------- let g:localvimrc_ask=0 @@ -134,18 +143,6 @@ if has("autocmd") \ exe "normal g`\"" | \ endif - autocmd FileType python setlocal omnifunc=pythoncomplete#Complete - autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete - autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS - autocmd FileType html setlocal omnifunc=htmlcomplete#CompleteTags - autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS - autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags - autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP - autocmd FileType c setlocal omnifunc=ccomplete#Completeset - autocmd Filetype java setlocal complete=.,w,b,u,t,i - autocmd Filetype java setlocal omnifunc=javacomplete#Complete - autocmd Filetype java setlocal completefunc=javacomplete#CompleteParamsInfo - " Syntax of these languages is fussy over tabs Vs spaces autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab -- cgit v1.1-2-g2b99