Steps I took to setup ctags on osx
- Install Homebrew (the better macports) from github
- Install new ctags, the one shipping with osx is too old:
$ brew install ctags - Create a folder to hold all the tagfiles for installed libraries
$ mkdir ~/.vim/tags - Generate tags for Qt and other includes
$ ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f ~/.vim/tags/qt4 /usr/include/qt4/ # for QT4 $ ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -f ~/.vim/tags/gl /usr/include/GL/ # for OpenGL - Download and unpack the modified libstdc++ headers. Use them to genetate a tagfile cpp for stl.
- Add this to your .vimrc
set tags+=tags;$HOME " configure tags - add additional tags here or comment out not-used ones set tags+=~/.vim/tags/cpp set tags+=~/.vim/tags/qt4 " build tags of your own project with Ctrl-F12 map:!/usr/local/bin/ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q . " 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"] " automatically open and close the popup menu / preview window au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif set completeopt=menuone,menu,longest,preview function! SuperCleverTab() if pumvisible() return "\ " endif "check if at beginning of line or after a space let substr = strpart( getline('.'), 0, col('.')-1 ) if substr =~ '^\s*$' return "\ " elseif exists('&omnifunc') && &omnifunc != '' let has_slash = match(substr, '\/') != -1 " position of slash, if any if has_slash return "\ \ " else "use omni-completion 1. priority return "\ \ " endif else "use omni completion or dictionary completion "use known-word completion return "\ " endif endfunction inoremap =SuperCleverTab()
No offense, but if there's a facebook like button, it'll be much easier for me to share.
Posted by: Elliptical reviews | 11/30/2011 at 06:07 AM
It's so nice to have you do all of the research for us. It makes our decision making so much easier!! Thanks.
Posted by: Shop Timberland Online | 12/02/2011 at 11:45 AM
please remove your link to spam website from your SO answer here!
http://stackoverflow.com/questions/6137830/elementtopropertymapping-in-restkit
Posted by: Alex | 12/16/2011 at 05:51 AM