About
Company is a text and code completion framework for Emacs. The name stands for "complete anything". It uses pluggable back-ends and front-ends to retrieve and display completion candidates.
It comes with several back-ends such as
Clang
, Ispell
,
CMake
, BBDB
, Yasnippet
,
Dabbrev
, Etags
, Gtags
,
Files
, Keywords
and others.
And the CAPF
back-end provides a bridge to the
standard completion-at-point-functions facility, and thus
works with any major mode that uses the common protocol.
Screenshots
Installation
This package is part of GNU ELPA (M-x list-packages).
M-x package-install RET company RET
Advanced users can also download the development snapshot.
Usage
Once installed, enable company-mode
with M-x company-mode.
Completion will start automatically after you type a few letters. Use C-n and C-p to select, <return> to complete or <tab> to complete the common part. Search through the completions with C-s, C-r and C-o. Press M-(digit) to quickly complete with one of the first 10 candidates.
Type M-x company-complete to initiate completion manually. Bind this command to a key combination of your choice (this is optional).
When the completion candidates are shown, press <f1> to display the documentation for the selected candidate, or C-w to see its source. Not all back-ends support this.
To use company-mode
in all buffers, add the following
line to your init file:
(add-hook 'after-init-hook 'global-company-mode)
To see or change the list of enabled back-ends, type M-x customize-variable RET company-backends. Also see its description for information on writing a back-end.
For information on specific back-ends, also check out the comments inside the respective files.
For more information, type M-x describe-function RET company-mode.
To customize other aspects of its behavior, type M-x customize-group RET company.
To diagnose missing or wrong completions, try M-x company-diag as the first step.
See Also
Feedback
If you experience any problems, please use the issue tracker. If you have a question or would like to submit a feature request, start a new discussion.
Contributing
Company is successful thanks to the input from many volunteers.
We welcome everyone to become a part of this project. Some ideas on how you could participate are listed in the Contributing file. And feel free to find your own unique way to improve Company.