Vim omni STL auto-completion

Source: Internet
Author: User

1) Download SGI's STL from SGI's site
Http://www.sgi.com/tech/stl/download.html)
 
2) With vim replace all _ STL_BEGIN_NAMESPACE by "namespace std {" and
_ STL_END_NAMESPACE by "}" (I use a macro to do this but maybe there
Is a better way eg: the command: bufdo) from header and source files.
 
3) Run ctags and put the generated tags file in a directory eg :~ /MyTags
 
4) set tags + = ~ /MyTags/stl. tags
 
We can do step 2) and 3) use the following sh:
#! /Bin/bash
Mkdir stl2
Mkdir stl3
 
Cd stl
For I in *
Do
Sed's/_ STL_BEGIN_NAMESPACE/namespace std {/'$ I> ../stl2/$ I
Done
 
Cd ../stl2
For I in *
Do
Sed's/_ STL_END_NAMESPACE/}/'$ I> ../stl3/$ I
Done
 
Cd ../stl3
Ctags-R -- c ++-kinds = + p -- fields = + iaS -- extra = + q-f ../stltags
 
Cd ..
Rm-rf stl2
 
Rm-rf stl3
 
Make sure that the stl is the same directory with sh.

From int64Ago's column

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.