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