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

SnipMate completion misses possibilities from partial words #209

Open
ajzafar opened this issue Sep 19, 2015 · 1 comment
Open

SnipMate completion misses possibilities from partial words #209

ajzafar opened this issue Sep 19, 2015 · 1 comment
Assignees

Comments

@ajzafar
Copy link
Collaborator

ajzafar commented Sep 19, 2015

From @unclechu:

Here the example of code that I need to write:

SocialSubFieldsCollection.__super__.initialize.apply(this, arguments);

I try to write:

SocialSubFieldsCollection.__super__.initialize.ap

Here the snippet: https://github.com/unclechu/vimrc2/blob/master/.vim/snippets/javascript.snippets#L104-L105
When I have space before .ap it calls snippet-autocomplete, but in this case it doesn't. But still works when I type full snippet name .apply. Then it means we have issue with snippet-autocomplete when we haven't space before snippet name, right?

@ajzafar
Copy link
Collaborator Author

ajzafar commented Sep 19, 2015

This is a limitation resulting from the fact that Vim's complete() function needs to know how big a word is to be completed. I think there's a workaround we can do, but it might be a while before I can get around to it. Right now, SnipMate looks only for possible snippets that start with the entire WORD before the cursor. In order to add other lookups, their triggers need to be combined with the rest of the WORD so that the completion function works correctly.

@ajzafar ajzafar self-assigned this Jan 1, 2024
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

No branches or pull requests

1 participant