comparison vimrc @ 229:fa5fa3251f4a

Add neocomplete and snippets
author zegervdv <zegervdv@me.com>
date Wed, 21 Jan 2015 18:03:42 +0100
parents 27091bae3a7e
children 73cc022a8bef
comparison
equal deleted inserted replaced
228:27091bae3a7e 229:fa5fa3251f4a
35 " Tmux 35 " Tmux
36 Plug 'christoomey/vim-tmux-navigator' 36 Plug 'christoomey/vim-tmux-navigator'
37 Plug 'tpope/vim-dispatch' 37 Plug 'tpope/vim-dispatch'
38 38
39 " Completing and snippets 39 " Completing and snippets
40 Plug 'ajh17/VimCompletesMe' 40 Plug 'shougo/neocomplete.vim'
41 Plug 'sirver/ultisnips' 41 Plug 'shougo/neosnippet.vim'
42 Plug 'honza/vim-snippets' 42 Plug 'shougo/neosnippet-snippets'
43 43
44 " Vim file navigation 44 " Vim file navigation
45 Plug 'tpope/vim-vinegar' 45 Plug 'tpope/vim-vinegar'
46 46
47 " Open and find files 47 " Open and find files
147 autocmd WinEnter * setlocal cursorline 147 autocmd WinEnter * setlocal cursorline
148 autocmd WinLeave * setlocal nocursorline 148 autocmd WinLeave * setlocal nocursorline
149 149
150 set sessionoptions-=options 150 set sessionoptions-=options
151 151
152 set complete+=kspell 152 " Scan files for completion
153 set complete=.,w,b,u,k,kspell,t,i,d
153 154
154 set splitright 155 set splitright
155 set virtualedit=block 156 set virtualedit=block
156 set conceallevel=0 157 set conceallevel=0
157 158
158 set cryptmethod=blowfish 159 set cryptmethod=blowfish
159 160
160 filetype plugin indent on 161 filetype plugin indent on
161 autocmd FileType ruby set tabstop=2|set shiftwidth=2
162 162
163 set pastetoggle=<F2> 163 set pastetoggle=<F2>
164 set clipboard=unnamed 164 set clipboard=unnamed
165 165
166 set undofile 166 set undofile
168 set backupdir=/tmp//,. 168 set backupdir=/tmp//,.
169 set directory=/tmp//,. 169 set directory=/tmp//,.
170 if v:version >= 703 170 if v:version >= 703
171 set undodir=/tmp//,. 171 set undodir=/tmp//,.
172 endif 172 endif
173
173 set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.o,*.bin,*.elf,*.hex,*.eps,.git/** 174 set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.o,*.bin,*.elf,*.hex,*.eps,.git/**
174 175
175 " Sentences are ended with double spaces 176 " Sentences are ended with double spaces
176 set cpo+=J 177 set cpo+=J
177 " }}} 178 " }}}
397 398
398 let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' 399 let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
399 let g:ctrlp_use_caching = 0 400 let g:ctrlp_use_caching = 0
400 endif 401 endif
401 " }}} 402 " }}}
403 " Neocomplete {{{
404 let g:neocomplete#enable_at_startup=1
405 " let g:neocomplete#data_directory=s:get_cache_dir('neocomplete')
406 " }}}
407 " Neosnippet {{{
408 let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets,~/.vim/snippets'
409 let g:neosnippet#enable_snipmate_compatibility=1
410
411 imap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : (pumvisible() ? "\<C-n>" : "\<TAB>")
412 smap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
413 imap <expr><S-TAB> pumvisible() ? "\<C-p>" : ""
414 smap <expr><S-TAB> pumvisible() ? "\<C-p>" : ""
415 " }}}
402 416
403 " Load local vimrc 417 " Load local vimrc
404 if filereadable($HOME . "/.vimrc.local") 418 if filereadable($HOME . "/.vimrc.local")
405 source ~/.vimrc.local 419 source ~/.vimrc.local
406 endif 420 endif