Configuration
Now we must tell vim to load the plugin files and the different tags. To do this, simply add to the end of the file ~ /. Vimrc the following lines:
Code:
"Prerequisites tags
set nocp
filetype plugin on
"Configure tags - add additional tags here or comment out not-used ones
set tags +=~/. vim / tags / stl
set tags +=~/. vim / tags / gl
set tags +=~/. vim / tags / sdl
set tags +=~/. vim/tags/qt4
Build tags of your own project with CTRL + F12
"map <C-F12>:! ctags-R - c + +-kinds = + p - fields = + IAS - extra = + q. <CR>
noremap <F12>:! ctags-R - c + +-kinds = + p - fields = + IAS - extra = + q. <cr>
inoremap <F12> <esc>:! ctags-R - c + +-kinds = + p - fields = + IAS - extra = + q. <cr>
"OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_MayCompleteDot = 1
let OmniCpp_MayCompleteArrow = 1
let OmniCpp_MayCompleteScope = 1
let OmniCpp_DefaultNamespaces = [ "std", "_GLIBCXX_STD"]
"Automatically open and close the popup menu / preview window
to CursorMovedI, InsertLeave * if pumvisible () == 0 | silent! pclose | endif
set completeopt = menuone, menu, longest, preview
If only some files were generated tags, comment on the other by adding the "beginning of line. For example if we have not generated ~ / .vim / tags / gl and ~ / .vim / tags / sdl:
Code:
set tags +=~/. vim / tags / stl
"set tags +=~/. vim / tags / gl
"set tags +=~/. vim / tags / sdl
set tags +=~/. vim/tags/qt4
We just have to save the file and (re) start vim so that they reflect changes to ~ /. Vimrc.
Bookmarks