-
Notifications
You must be signed in to change notification settings - Fork 168
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
Autocompletion cuts off last character for parameter replacement. #336
Comments
Did you find a solution? |
Did you try to select a suggestion and pressing escape instead of pressing tab or enter or any other key? |
I'm impressed someone followed up -This was a long time ago - but no, I
didn't find a solution, I ended up giving up on that feature.
I actually moved to VSCode because using C# with Vim was hard to get to
work right. I'd love to be able to go back, the VSCode vim bindings aren't
that great.
…On Thu, Dec 5, 2019 at 4:10 AM DasOhmoff ***@***.***> wrote:
Did you try to select a suggestion and pressing escape instead of pressing
tab or enter or any other key?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#336?email_source=notifications&email_token=AACBR6HCT7S2TWY5WNVGDZDQXDASFA5CNFSM4ET36IH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGAAQVY#issuecomment-562038871>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACBR6FEGFKUJYSEAO2KT4TQXDASFANCNFSM4ET36IHQ>
.
|
Ah, I see. |
Hey guys, I did manage to recreate this once, but never found the error (I don't usually use snippets myself). I can try to give it another look - I've always meant to dig into it but never found the time, sorry. |
Well, I'm really stuck on this. I'm inclined to think it might be a bug in the Vim python package? For some reason that I just can't work out, it is UltiSnips/vim_helper.py#L184 that causes an extra space (or spaces) to be inserted at the start of the argument list: buf.cursor = start That vim.current.window.cursor = pos.line + 1, nbyte This is the line that is inserting a space, but why? Commenting out line 184 results in correct snippet insertion - but the semi-colon at the end now has whitespace in front it it (possibly from other calls to The other thing is that all of this only appears to occur when using the UltiSnips trigger, However attempting to map something else to inoremap <Tab> <C-y> This is what makes me think this is a Vim bug - I'll try to put together a minimal example and raise it as a Vim issue. In the meantime, I recommend using |
Pretty sure this feature only worked for a small amount of time and was hardly tested. I somehow managed to talk @markwoodhall into implementing it after I'd already defected to Emacs. He shortly defected to Clojure I believe, leaving nobody actually using this feature :) |
@nosami it's actually a great feature and for the most part works really well (except for this annoying issue). I did use it for a while. The reason I stopped using it was the same reason I always stop using things like autopairs or delimitmate - I find automatically inserted code gets in my way more than it helps. But that's a personal style preference and not a reflection on the feature. |
Here's a screencast of what is happening, as it's a little hard to describe:
https://streamable.com/s/jdt9u/llbvcw.gif
I'm using the default omnisharp server, omnisharp-vim, Supertab, and ultisnips.
Basically, when I do parameter completion, it cuts the last character off the parameter and I have to manually delete it every time.
The text was updated successfully, but these errors were encountered: