Recognizing that it does not support memorization, you can get some kind of intellisense running on vim. The advantage is that you can create tags from your own and external source code files. In any case, STL needs special treatment, which is described here.
Download these vim scripts OmniCppComplete and SuperTab .
Install OmniCppComplete:
- Unzip the plugin to ~ / .vim.
Install SuperTab:
- Open the file in vim ($ vim supertab.vba).
- File Source (: so%).
Install ctags through your favorite package manager. Download and unzip this file and run ctags.
$ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ tags_stl cpp_src
This will create a ctags file called 'tags_stl' containing the STL tags. Copy it anywhere. Add the following lines that do not yet exist in ~ / .vimrc:
set tags+=~/path/to/your/tags_stl filetype on filetype plugin on let OmniCpp_GlobalScopeSearch=1 let OmniCpp_NamespaceSearch=2 let OmniCpp_MayCompleteDot=1 let OmniCpp_MayCompleteArrow=1 let OmniCpp_MayCompleteScope=1 let OmniCpp_DisplayMode=1 let OmniCpp_DefaultNamespaces=["std"]
This completes the STL statements in 'tab', '.', '::' and '->', even when 'using namespace std;'. Do not do this if you hate the purple color.
robsn
source share