diff --git a/.gitmodules b/.gitmodules index 83cf6c1..1eeae93 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,9 +10,6 @@ [submodule ".vim/bundle/supertab"] path = .vim/bundle/supertab 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"] path = .vim/bundle/tlib_vim url = http://github.com/tomtom/tlib_vim.git @@ -58,3 +55,12 @@ [submodule ".vim/bundle/ctrlp.vim"] path = .vim/bundle/ctrlp.vim 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 diff --git a/.vim/bundle/Command-T b/.vim/bundle/Command-T deleted file mode 160000 index f9d168c..0000000 --- a/.vim/bundle/Command-T +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f9d168cdd2da3c20423c9eed9f538cbf0f7914d1 diff --git a/.vim/bundle/YouCompleteMe b/.vim/bundle/YouCompleteMe new file mode 160000 index 0000000..7f21fb6 --- /dev/null +++ b/.vim/bundle/YouCompleteMe @@ -0,0 +1 @@ +Subproject commit 7f21fb6092290ded4669941e41c8f984035a18a2 diff --git a/.vim/bundle/ultisnips b/.vim/bundle/ultisnips new file mode 160000 index 0000000..1c6b4f7 --- /dev/null +++ b/.vim/bundle/ultisnips @@ -0,0 +1 @@ +Subproject commit 1c6b4f75a006c4411d01a1234cabda3eb4aded1a diff --git a/.vim/bundle/vim-snippets b/.vim/bundle/vim-snippets new file mode 160000 index 0000000..e840b91 --- /dev/null +++ b/.vim/bundle/vim-snippets @@ -0,0 +1 @@ +Subproject commit e840b91a4e86cda657519eba00766a29a614e1e2 diff --git a/.vimrc b/.vimrc index 2659f05..8b4719a 100644 --- a/.vimrc +++ b/.vimrc @@ -15,6 +15,8 @@ if &t_Co >= 256 && ! has("gui_running") colorscheme inkpot endif +set sessionoptions-=options " Because pathogen. + set textwidth=120 set wrap " auto wrap line view, but not text itself @@ -99,6 +101,9 @@ nnoremap s vl:bn " ,S will split horizontally and swith over the new panel nnoremap S sl:bn +nnoremap +nnoremap + " Wrap a paragraph and justify it :runtime macros/justify.vim nnoremap j gw}{V}:call Justify('tw',4) @@ -111,7 +116,10 @@ nnoremap r :RainbowToggle nnoremap u :GundoToggle " remove all C/C++ comments and blank lines -nnoremap c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//:%s/^\s*\n// +" nnoremap c :%s/\/\*\_.*\*\/\n\{,1}\|^\s*\/\/.*\n\|\s*\/\/.*//:%s/^\s*\n// +nnoremap c :close + +nnoremap n :noh " set a tiny guifont size nnoremap h :set guifont=Deja\ Vu\ Sans\ Mono\ 4 @@ -181,8 +189,8 @@ imap :move .-2 vmap :move '>+1gv vmap :move '<-2gv -filetype plugin on -set ofu=syntaxcomplete#Complete +" filetype plugin on +" set ofu=syntaxcomplete#Complete au BufRead,BufNewFile *.mwiki setf Wikipedia au BufRead,BufNewFile *.wikipedia.org.* setf Wikipedia @@ -249,33 +257,46 @@ nnoremap b :TagbarToggle map :NERDTreeToggle " nnoremap t :NERDTreeToggle + +" go to definition and center screen (navigate forward in the tags stack) +nnoremap :YcmCompleter GoTozz +" jump back from definition (navigate backward in the jumps stack) +nnoremap +" open the definition in a vertical split and center screen +nnoremap :vsp :exec(":YcmCompleter GoTo")zz + +nnoremap ? :YcmCompleter GetDoc + +" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. +let g:UltiSnipsExpandTrigger="" + " configure tags - add additional tags here or comment out not-used ones -set tags+=./tags;$HOME -set tags+=~/code/paradiseo/tags -set tags+=~/.vim/tags/cpp +" set tags+=./tags;$HOME +" set tags+=~/code/paradiseo/tags +" set tags+=~/.vim/tags/cpp " build tags of your own project with CTRL+F12 -map :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . +" map :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . " go to definition and center screen (navigate forward in the tags stack) -nnoremap zz +" nnoremap zz " jump back from definition (navigate backward in the tags stack) -nnoremap +"nnoremap " open the definition in a vertical split and center screen -nnoremap :vsp :exec("tag ".expand(""))zz +" nnoremap :vsp :exec("tag ".expand(""))zz " OmniCppComplete -let OmniCpp_NamespaceSearch = 1 -let OmniCpp_GlobalScopeSearch = 1 -let OmniCpp_ShowAccess = 1 -let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters -let OmniCpp_MayCompleteDot = 1 " autocomplete after . -let OmniCpp_MayCompleteArrow = 1 " autocomplete after -> -let OmniCpp_MayCompleteScope = 1 " autocomplete after :: -let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"] +" let OmniCpp_NamespaceSearch = 1 +" let OmniCpp_GlobalScopeSearch = 1 +" let OmniCpp_ShowAccess = 1 +" let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters +" let OmniCpp_MayCompleteDot = 1 " autocomplete after . +" let OmniCpp_MayCompleteArrow = 1 " autocomplete after -> +" let OmniCpp_MayCompleteScope = 1 " autocomplete after :: +" let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"] " automatically open and close the popup menu / preview window -au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif -set completeopt=menuone,menu,longest,preview +" au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif +" set completeopt=menuone,menu,longest,preview " close the buffer without deleting its window ":runtime bundle/bclose.vim