Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Don't trigger expansion when prefix is part of a larger word #99

Merged
merged 1 commit into from
Jan 15, 2015

Conversation

maxbrunsfeld
Copy link
Contributor

Currently, if a snippet prefix precedes the cursor, snippet expansion is triggered by the tab key. This PR prevents triggering snippet expansion if the snippet prefix preceding the cursor is part of a larger word, as defined by the editor.nonWordCharacters config setting.

I'm not sure if this is the right thing to do, but I think it addresses issues raised by @dsandstrom in #59.

@maxbrunsfeld
Copy link
Contributor Author

/cc @kevinsawicki; can you 👓 at this one too?

@kevinsawicki
Copy link
Contributor

Yeah, this sounds good to me, no common cases just to mind that this would "break" and I imagine this makes things more consistent with other editors people may be using snippets in.

@maxbrunsfeld
Copy link
Contributor Author

Ok, I think I'm going to say that this Fixes #59.

maxbrunsfeld pushed a commit that referenced this pull request Jan 15, 2015
…prefixes

Don't trigger expansion when prefix is part of a larger word
@maxbrunsfeld maxbrunsfeld merged commit d3b0bcc into master Jan 15, 2015
@maxbrunsfeld maxbrunsfeld deleted the mb-handle-words-ending-with-snippet-prefixes branch January 15, 2015 23:37
@maxbrunsfeld
Copy link
Contributor Author

Oops after doing some testing, there are some cases where snippets still expand even as part of a larger word. I'm fixing it up.

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

Successfully merging this pull request may close these issues.

None yet

2 participants