vim deactivate completion in favor of YCM
This commit is contained in:
parent
566baad18e
commit
e34584c57d
6 changed files with 53 additions and 24 deletions
12
.gitmodules
vendored
12
.gitmodules
vendored
|
|
@ -10,9 +10,6 @@
|
||||||
[submodule ".vim/bundle/supertab"]
|
[submodule ".vim/bundle/supertab"]
|
||||||
path = .vim/bundle/supertab
|
path = .vim/bundle/supertab
|
||||||
url = http://github.com/ervandew/supertab.git
|
url = http://github.com/ervandew/supertab.git
|
||||||
[submodule ".vim/bundle/Command-T"]
|
|
||||||
path = .vim/bundle/Command-T
|
|
||||||
url = http://github.com/wincent/Command-T.git
|
|
||||||
[submodule ".vim/bundle/tlib_vim"]
|
[submodule ".vim/bundle/tlib_vim"]
|
||||||
path = .vim/bundle/tlib_vim
|
path = .vim/bundle/tlib_vim
|
||||||
url = http://github.com/tomtom/tlib_vim.git
|
url = http://github.com/tomtom/tlib_vim.git
|
||||||
|
|
@ -58,3 +55,12 @@
|
||||||
[submodule ".vim/bundle/ctrlp.vim"]
|
[submodule ".vim/bundle/ctrlp.vim"]
|
||||||
path = .vim/bundle/ctrlp.vim
|
path = .vim/bundle/ctrlp.vim
|
||||||
url = http://github.com/kien/ctrlp.vim.git
|
url = http://github.com/kien/ctrlp.vim.git
|
||||||
|
[submodule ".vim/bundle/YouCompleteMe"]
|
||||||
|
path = .vim/bundle/YouCompleteMe
|
||||||
|
url = https://github.com/Valloric/YouCompleteMe.git
|
||||||
|
[submodule ".vim/bundle/ultisnips"]
|
||||||
|
path = .vim/bundle/ultisnips
|
||||||
|
url = https://github.com/SirVer/ultisnips.git
|
||||||
|
[submodule ".vim/bundle/vim-snippets"]
|
||||||
|
path = .vim/bundle/vim-snippets
|
||||||
|
url = https://github.com/honza/vim-snippets.git
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f9d168cdd2da3c20423c9eed9f538cbf0f7914d1
|
|
||||||
1
.vim/bundle/YouCompleteMe
Submodule
1
.vim/bundle/YouCompleteMe
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 7f21fb6092290ded4669941e41c8f984035a18a2
|
||||||
1
.vim/bundle/ultisnips
Submodule
1
.vim/bundle/ultisnips
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1c6b4f75a006c4411d01a1234cabda3eb4aded1a
|
||||||
1
.vim/bundle/vim-snippets
Submodule
1
.vim/bundle/vim-snippets
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit e840b91a4e86cda657519eba00766a29a614e1e2
|
||||||
61
.vimrc
61
.vimrc
|
|
@ -15,6 +15,8 @@ if &t_Co >= 256 && ! has("gui_running")
|
||||||
colorscheme inkpot
|
colorscheme inkpot
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
set sessionoptions-=options " Because pathogen.
|
||||||
|
|
||||||
set textwidth=120
|
set textwidth=120
|
||||||
set wrap " auto wrap line view, but not text itself
|
set wrap " auto wrap line view, but not text itself
|
||||||
|
|
||||||
|
|
@ -99,6 +101,9 @@ nnoremap <leader>s <C-w>v<C-w>l:bn<CR>
|
||||||
" ,S will split horizontally and swith over the new panel
|
" ,S will split horizontally and swith over the new panel
|
||||||
nnoremap <leader>S <C-w>s<C-w>l:bn<CR>
|
nnoremap <leader>S <C-w>s<C-w>l:bn<CR>
|
||||||
|
|
||||||
|
nnoremap <leader><HOME> <C-w><left>
|
||||||
|
nnoremap <leader><END> <C-w><right>
|
||||||
|
|
||||||
" Wrap a paragraph and justify it
|
" Wrap a paragraph and justify it
|
||||||
:runtime macros/justify.vim
|
:runtime macros/justify.vim
|
||||||
nnoremap <leader>j gw}{V}:call Justify('tw',4)<CR>
|
nnoremap <leader>j gw}{V}:call Justify('tw',4)<CR>
|
||||||
|
|
@ -111,7 +116,10 @@ nnoremap <leader>r :RainbowToggle<CR>
|
||||||
nnoremap <leader>u :GundoToggle<CR>
|
nnoremap <leader>u :GundoToggle<CR>
|
||||||
|
|
||||||
" remove all C/C++ comments and blank lines
|
" remove all C/C++ comments and blank lines
|
||||||
nnoremap <leader>c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//<CR>:%s/^\s*\n//<CR>
|
" nnoremap <leader>c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//<CR>:%s/^\s*\n//<CR>
|
||||||
|
nnoremap <leader>c :close<CR>
|
||||||
|
|
||||||
|
nnoremap <leader>n :noh<CR>
|
||||||
|
|
||||||
" set a tiny guifont size
|
" set a tiny guifont size
|
||||||
nnoremap <leader>h :set guifont=Deja\ Vu\ Sans\ Mono\ 4<CR>
|
nnoremap <leader>h :set guifont=Deja\ Vu\ Sans\ Mono\ 4<CR>
|
||||||
|
|
@ -181,8 +189,8 @@ imap <C-Up> <C-o>:<C-u>move .-2<CR>
|
||||||
vmap <C-Down> :move '>+1<CR>gv
|
vmap <C-Down> :move '>+1<CR>gv
|
||||||
vmap <C-Up> :move '<-2<CR>gv
|
vmap <C-Up> :move '<-2<CR>gv
|
||||||
|
|
||||||
filetype plugin on
|
" filetype plugin on
|
||||||
set ofu=syntaxcomplete#Complete
|
" set ofu=syntaxcomplete#Complete
|
||||||
|
|
||||||
au BufRead,BufNewFile *.mwiki setf Wikipedia
|
au BufRead,BufNewFile *.mwiki setf Wikipedia
|
||||||
au BufRead,BufNewFile *.wikipedia.org.* setf Wikipedia
|
au BufRead,BufNewFile *.wikipedia.org.* setf Wikipedia
|
||||||
|
|
@ -249,33 +257,46 @@ nnoremap <leader>b :TagbarToggle<CR>
|
||||||
map <F11> :NERDTreeToggle<cr>
|
map <F11> :NERDTreeToggle<cr>
|
||||||
" nnoremap <leader>t :NERDTreeToggle<cr>
|
" nnoremap <leader>t :NERDTreeToggle<cr>
|
||||||
|
|
||||||
|
|
||||||
|
" go to definition and center screen (navigate forward in the tags stack)
|
||||||
|
nnoremap <leader><Up> :YcmCompleter GoTo<CR>zz
|
||||||
|
" jump back from definition (navigate backward in the jumps stack)
|
||||||
|
nnoremap <leader><Down> <C-O>
|
||||||
|
" open the definition in a vertical split and center screen
|
||||||
|
nnoremap <leader><Right> :vsp <CR>:exec(":YcmCompleter GoTo")<CR>zz
|
||||||
|
|
||||||
|
nnoremap <leader>? :YcmCompleter GetDoc<CR>
|
||||||
|
|
||||||
|
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
|
||||||
|
let g:UltiSnipsExpandTrigger="<C-s>"
|
||||||
|
|
||||||
" configure tags - add additional tags here or comment out not-used ones
|
" configure tags - add additional tags here or comment out not-used ones
|
||||||
set tags+=./tags;$HOME
|
" set tags+=./tags;$HOME
|
||||||
set tags+=~/code/paradiseo/tags
|
" set tags+=~/code/paradiseo/tags
|
||||||
set tags+=~/.vim/tags/cpp
|
" set tags+=~/.vim/tags/cpp
|
||||||
|
|
||||||
" build tags of your own project with CTRL+F12
|
" build tags of your own project with CTRL+F12
|
||||||
map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
|
" map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
|
||||||
" go to definition and center screen (navigate forward in the tags stack)
|
" go to definition and center screen (navigate forward in the tags stack)
|
||||||
nnoremap <leader><Up> <C-]>zz
|
" nnoremap <leader><Up> <C-]>zz
|
||||||
" jump back from definition (navigate backward in the tags stack)
|
" jump back from definition (navigate backward in the tags stack)
|
||||||
nnoremap <leader><Down> <C-T>
|
"nnoremap <leader><Down> <C-T>
|
||||||
" open the definition in a vertical split and center screen
|
" open the definition in a vertical split and center screen
|
||||||
nnoremap <leader><Right> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>zz
|
" nnoremap <leader><Right> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>zz
|
||||||
|
|
||||||
" OmniCppComplete
|
" OmniCppComplete
|
||||||
let OmniCpp_NamespaceSearch = 1
|
" let OmniCpp_NamespaceSearch = 1
|
||||||
let OmniCpp_GlobalScopeSearch = 1
|
" let OmniCpp_GlobalScopeSearch = 1
|
||||||
let OmniCpp_ShowAccess = 1
|
" let OmniCpp_ShowAccess = 1
|
||||||
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
|
" let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
|
||||||
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
|
" let OmniCpp_MayCompleteDot = 1 " autocomplete after .
|
||||||
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
|
" let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
|
||||||
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
|
" let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
|
||||||
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
|
" let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
|
||||||
|
|
||||||
" automatically open and close the popup menu / preview window
|
" automatically open and close the popup menu / preview window
|
||||||
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
|
" au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
|
||||||
set completeopt=menuone,menu,longest,preview
|
" set completeopt=menuone,menu,longest,preview
|
||||||
|
|
||||||
" close the buffer without deleting its window
|
" close the buffer without deleting its window
|
||||||
":runtime bundle/bclose.vim
|
":runtime bundle/bclose.vim
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue