Vim C + + auto-completion

Source: Internet
Author: User

Vim is a kind of vi-like text editor, but on the basis of VI added a lot of new features, Vim is generally respected as the best of the Class VI editor, in fact, the real enemy from the different variants of Emacs. 1999 Emacs was selected as the winner of the LinuxWorld text editing category and Vim was second. But in February 2000 vim won Slashdot Beanie's best Open source Text Editor award, and Emacs was pushed to the second line, with Vim and Emacs also being a very good text editor. Vim configuration file in/ETC/VIM/VIMRC, modify this configuration file will affect all users, we basically do not touch it. It is common to create. vimrc files in your own home directory, which only affects individual users. In this file set up some common: auto indent and so on.

The automatic completion of C + + under Vim is mainly based on the Omnicppcomplete plugin.

Installation of Omnicppcomplete:

: http://www.vim.org/scripts/script.php?script_id=1520

Omnicppcomplete plugin is to rely on tags to work, so in the library to use under the Ctags to build tags index. by command: Ctags-r--c++-kinds=+p--fields=+ias--extra=+q

This command should be executed in the directory you want to index, such as your file in the ~/cpp directory, under which the command is executed.

Vim C + + auto-completion

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.