Emacs 24.4.1 using the company mode Smart prompt C + + program

Source: Internet
Author: User

Company is not a corporation, but a synthesis of two words, complete anything. So it's not just for C + + programming.

First install Company-mode using the package system

M-x list-packages

Then search for Company-mode

I, x installation


Company Mode official documentation is here


Modify ~/.emacs.d/init.el, add a row

(Add-hook ' After-init-hook ' Global-company-mode)


After you restart Emacs, open a C + + project file, edit the source code, you will see a prompt box



M-x Comany-mode, which can be opened or closed in the current buffer.


You can also specify C + + Hooker

(Add-hook ' C++-mode-hook ' Global-company-mode)


Used a bit better than the previous auto-complete. However, the custom function is still unable to complete the smart completion, and the estimate needs to be further configured.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Emacs 24.4.1 using the company mode Smart prompt C + + program

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.