Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix <c-y> causing strange popup menu and solve <tab> conflict with ultisnips #1272

Closed
wants to merge 6 commits into from

Conversation

Liangzhi233
Copy link

Use CONTROL-Y to accept the current candidate will cause a second popup menu. Because after ycm insterts the candidate, cursor position has changed and ycm will find a new candidate again. I delete the candidate exactly same as the text to match. Thus, no second popup menu will occur.

By this enhancement, I can use vim script to use TAB key for both cycling through ycm candidates and ultisnips placeholders. Also I can use ENTER key for both accepting ycm candidate and expand ultisnips. I add the solution to README.md.

@vheon
Copy link
Contributor

vheon commented Dec 6, 2014

Travis is not happy, apparently some tests are not passing. What I didn't understand is what you are trying to solve. Can you make a simple reproducible test case?

@Liangzhi233
Copy link
Author

screen shot 2014-12-07 at 12 01 09
Look at this situation, when I typed "al" and select the right candidates. If I use CONTROL-Y to accept the candidate and close the popup menu, I get another popup menu, like following picture
screen shot 2014-12-07 at 12 01 27
This strange popup menu can be closed by hand by one more CONTROL-Y, but can never be closed by vim script. Thus, I cannot use TAB to cycle through placeholders in ultisnips.

My solution is to make ycm not display the candidate exact same as the text I have typed.

@Valloric
Copy link
Member

The benefit doesn't seem worth the extra complexity, sorry. Thank you for sending a pull request though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants