-
Notifications
You must be signed in to change notification settings - Fork 596
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
Do not record <CR> while in code completion, record chosen text instead. To be able to use the DOT command. [$50] #629
Comments
Could somebody give me some hints? Where should I start look at? |
DOT is implemented in method '- (XVimEvaluator*)DOT' in the file XVimNormalEvaluator.m . If you will investigate it,
|
A keyStroke is put to the repeat register by [XVim appendOperaitonKeyStroke:]. |
Well, I think the actual issue is not that the auto completed text is recorded into the register but is recorded into the register because when fix the auto completion you have to hit enter. Sorry I do not have enough time to fix this soon... |
Ok I think I have found the flow logic the fix the issue. Problem is I can't try to fix that because I can't run the app. (I am under Yosemite). Edit: Removed crash log as problem is fixed |
I have the same problem I can not debug Xcode6 by Xcode6 but I can debug Xcode6 by Xcode5. |
+1 to this issue, I'm used to vim and YCM which handles this case quite gracefully. |
#628 lets us debug it! |
I looked at it (a little). As a first quickfix what do you think if I'd prevent |
Are you talking about disabling those keys entirely during autocomplete? If so, then that's going to get the hugest of all possible 👎s from me. Breaking Xcode's functionality to "fix" XVim's functionality shouldn't even be a conversation. |
No that would be stupid. I'm talking about prevent the recording of those keys in XVim to avoid to reuse them in Now, the focus is in the AutoCompletion window and those keys are used for browsing the list and validate the completion choice. So those keys do nothing in the editor and in XVim but they still are recorded for |
hmm yeah it is half the equation, the other half is to extract what the menu choice expands to. |
+1 |
Any update on this issue? |
1 similar comment
Any update on this issue? |
A note for those looking to implement this. Even if there exists no API to "fetch" the text involved with the autocomplete choice that was made, the state of the editor buffer can offer the definitive answer as to what that value was. It might be possible to do a scan backward in the buffer to read out what the value that was "typed". I think it may be tricky. Because I think XCode is nice and allows fuzzy matching. That would make reconciling the keystrokes a bit tricky... Hopefully not too hard to do. |
+1 |
I tried to fix it. But it doesn't work correctly if completionText contains placeholder. For example // You type the code using completion.
[NSString stringWithFormat:@"Test"]
// Xcode will complete like this if completionText contains placeholder.
[NSString stringWithFormat:(nonnull NSString *), ... @"Test"]; |
When using the native Xcode auto complete in insert mode, if I choose a suggestion and then press escape, the next time I use the DOT command XVim will write the beginning of the word I typed followed by a new line.
There is a $50 open bounty on this issue. Add to the bounty at Bountysource.
The text was updated successfully, but these errors were encountered: