ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.46k stars 2.81k forks source link

gitcommit triggers #1957

Closed coachshea closed 8 years ago

coachshea commented 8 years ago

After install vim-rhubarb by Tim Pope, I was able to get completion of issues and collaborators in gitcommit files by pressing either <c-x><c-o> or <c-space>. I decided to try to trigger this automatically. I removed gitcommit from the disable list and add 'gitcommit': ['@', '#'], to my list of semantic triggers. While this does trigger completion, I get a different list with the trigger than I do if I manually type or after typing a '#' or '@'. Even with the completions already showing (the wrong completions) I can get to the correct completions by typing or . I'll be happy to give move specifics about the completions if it will help, but is there any reason that these two completion lists should be any different at all. As I understand it (my apologies if I'm wrong), but defining a trigger is simply supposed to bring up the same list as without having to type it. Any help is greatly appreciated.

micbou commented 8 years ago

by pressing either or .

By pressing what and what?

coachshea commented 8 years ago

Sorry, I didn't escape that properly and it was removed without me noticing. Let me try again, by pressing either ctrl-x/ctrl-o or ctrl-space.

puremourning commented 8 years ago

Could be related to the javacomplete-related issue with @

IIRC there is some strange interaction with the omnicomplete system which differs when you use forced triggering.

micbou commented 8 years ago

Yes, I think this is the same issue as #1322 and #1816.

coachshea commented 8 years ago

Thank you. That explains it.

For now, I've decided to use a workaround.

au FileType gitcommit inoremap # #<c-x><c-o>
au FileType gitcommit inoremap @ @<c-x><c-o>

It seems to get the job done.

Thanks again for your help and for the great plugin.

On Thu, Feb 04, 2016 at 12:58:54PM -0800, micbou wrote:

Yes, I think this is the same issue as #1322 and #1816.

— Reply to this email directly or view it on GitHub.*