2

Recently I have used company and I like it. But I feel prone to the mistake using the command company-complete-common. For example, when I make company-mode enabled on emacs-lisp-mode,

  1. I'm going to input the function "find-file". I typed "fin" one part of the function.
  2. Many emacs-lisp functions "find-file","find-file--read-only",...,"finger" are included in company candidates.
  3. Since the candidate popup often shows "find*" functions on display hiding the "finger" function, I execute company-complete-common by mistake. But the cursol is just moved down without completing common part.

So I want to know the common part before executing company-complete-common. Showing it like displaying continuing string with only one company candidate is ideal, I think. So is there the pacakge enabling it, or how to write the function to do so? I also want to know other ways to display the common part.

  • It seems like you should be able to do this with the face company-preview-common. According to the documentation, this is the "Face used for the common part of the completion preview", but I have tried customizing it, and can't get it to work... – elethan Jul 29 '16 at 21:21
  • Thank you for your comment. I changed the foreground color of company-preview-common like (set-face-attribute 'company-preview-common nil :foreground "red"), but it is effective only when the candidate is sole and previewed. I want to preview the common part among multiple candidates filtered by input string. – hewld Jul 31 '16 at 3:17
  • I posted this question to the company-mode page on github. I put the animated gif on that page and the question may be understandable, so refer to this, too. – hewld Aug 2 '16 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.