summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
m---------.vim/bundle/neocomplete.vim0
m---------.vim/bundle/syntastic0
m---------.vim/bundle/ultisnips0
m---------.vim/bundle/vim-fugitive0
m---------.vim/bundle/vim-unimpaired0
-rw-r--r--.vimrc45
7 files changed, 46 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules
index 0464967..09c57ec 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -31,3 +31,6 @@
[submodule ".zsh/zsh-syntax-highlighting-git"]
path = .zsh/zsh-syntax-highlighting-git
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
+[submodule ".vim/bundle/neocomplete.vim"]
+ path = .vim/bundle/neocomplete.vim
+ url = https://github.com/Shougo/neocomplete.vim.git
diff --git a/.vim/bundle/neocomplete.vim b/.vim/bundle/neocomplete.vim
new file mode 160000
+Subproject c9cb9dbdb8d083d48e7d447d138ea5c1ad81da5
diff --git a/.vim/bundle/syntastic b/.vim/bundle/syntastic
-Subproject 60578c35d2a4babd0eab9bb2afafc6cece449e9
+Subproject 2fbd870a20062f8849a4f530446787d21394c40
diff --git a/.vim/bundle/ultisnips b/.vim/bundle/ultisnips
-Subproject cd83608df381a12e25ecb5eedbd1f6cf280881d
+Subproject 7a6abe02ec821574547964625061df7b763b196
diff --git a/.vim/bundle/vim-fugitive b/.vim/bundle/vim-fugitive
-Subproject 00b0916ae2fc4e329f519686348de13d7477d77
+Subproject 61fac2f738306119ddc0052de3da031777c855e
diff --git a/.vim/bundle/vim-unimpaired b/.vim/bundle/vim-unimpaired
-Subproject 48d1cb6bf0000159291014226d8d8d3330ad875
+Subproject a029dc28ebc1ba5953cd5b0ef9a50bd0ffba3aa
diff --git a/.vimrc b/.vimrc
index a97c9ab..b493383 100644
--- a/.vimrc
+++ b/.vimrc
@@ -50,7 +50,8 @@ set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'scrooloose/syntastic'
-Bundle 'Valloric/YouCompleteMe'
+"Bundle 'Valloric/YouCompleteMe'
+Bundle 'Shougo/neocomplete.vim'
Bundle 'SirVer/ultisnips'
Bundle 'tpope/vim-unimpaired'
Bundle 'tpope/vim-fugitive'
@@ -114,7 +115,47 @@ let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
-nmap <silent> ,s :set spell!<CR>
+let g:acp_enableAtStartup = 0
+let g:neocomplcache_enable_at_startup = 1
+" Use smartcase.
+let g:neocomplcache_enable_smart_case = 1
+" Set minimum syntax keyword length.
+let g:neocomplcache_min_syntax_length = 2
+
+" <CR>: close popup and save indent.
+"inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
+"function! s:my_cr_function()
+ "return neocomplcache#smart_close_popup() . "\<CR>"
+ "" For no inserting <CR> key.
+ ""return pumvisible() ? neocomplcache#close_popup() : "\<CR>"
+"endfunction
+" <TAB>: completion.
+inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
+" <C-h>, <BS>: close popup and delete backword char.
+inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>"
+"inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>"
+inoremap <expr><C-y> neocomplcache#close_popup()
+inoremap <expr><C-e> neocomplcache#cancel_popup()
+" Close popup by <Space>.
+"inoremap <expr><Space> pumvisible() ? neocomplcache#close_popup() : "\<Space>"
+
+" Enable heavy omni completion.
+if !exists('g:neocomplcache_omni_patterns')
+ let g:neocomplcache_omni_patterns = {}
+endif
+let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
+let g:neocomplcache_omni_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)'
+let g:neocomplcache_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::'
+
+" For perlomni.vim setting.
+" https://github.com/c9s/perlomni.vim
+let g:neocomplcache_omni_patterns.perl = '\h\w*->\h\w*\|\h\w*::'
+
+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
autocmd FileType make setlocal noexpandtab
au FileType python set ts=4 sw=4 softtabstop=4 et