Add code complementing function in vim (Added STL support for Omnicppcomplete)

Source: Internet
Author: User

Many new users will feel it is difficult to get started when using Vim, and it is easy to vomit Vim's support for STL completion. Then go to VS. Here we will introduce how to add code complementing function to Vim. After Code Completion is added, the power of Vim has also improved ~
1. The next ctags plug-in for Vim. Currently, many Vim plug-ins are developed based on ctags. Http://ctags.sourceforge.net/
2. For more information about the installation process, see other articles on ctags on the Internet.
3. Next, download the OmniCppComplete plug-in and copy it to the vim installation directory. My directory is/usr/share/vim/vim73.
4. decompress the package and add the OmniCppComplete instructions and. vim files to the original doc and plugin directories.
5. Download the STL source code, decompress it, and enter the following command in the terminal:
 
Ctags-R -- c ++-kinds = + p -- fields = + iaS -- extra = + q
 
6. A tags file will appear in the STL source code directory.
7. In ~ /. Add the path of the tags file to the vimrc file. My STL source code directory is/home/sph.pdf/Software/stl, so add this sentence to. vimrc.
 
Set tags + =/sphinx/Software/stl/tags
 
8. Enable Vim ~




Source code strength

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.