-
Notifications
You must be signed in to change notification settings - Fork 31
Implement snippet name overlap checker system #284
Comments
I will consider doing this after the 3.6.0 update |
First—love the extension, thank you! I have this exact issue. I had a large number of snippets that 'overlap' and after a recent update, I only get the shortest snippet. For example I have both What is the design intention here? I'm happy to go along with your best practices but it's not clear from your options or what you wrote above how you imagine this will work best :) Thanks again! Lee Edit: Ok it looks like deleting all 'snippet delimiters' restores the original functionality. |
Right, so, actually, this feature should have been there before the last upgrade was pushed rather now as an after-thought. Although I never really touched snipNameDelimiters, so I am not sure why so many people had this setting reset. In any case, now that the problem is there, this feature is necessary to correct it :) |
You got a lot of support requests because the functionality changed :) The only way to get the behavior I had before is to turn on the delimiters and then delete them all from the list. I'm not sure I understand your point "makes typing literally any other word that contains s or ds impossible" — surely it's only a problem if you trigger the extension? |
Yah right. I even put this in the v3.5.2 change log box but many people don't read it :(
Why would you turn on the delimiters and then delete them all from the list? Isn't that situation the same as not having delimiters at all? (i.e. delimiter setting set to off)
I agree, but many people keep very simple hotkeys (like just space). This results in avoiding such overlaps very important. |
On my system (Chromium, Ubuntu) if I keep delimiters off, I cannot use snippets if they adjoin another word (ex. I cannot trigger snippets that do not require a space before them, ex. — em dash). If I turn delimiters on, I cannot use a snippet if there is a shorter one (ex.
That is hardcore! :D |
Alright, that is definitely some unexpected behavior. Could you please give an exact example of a snippet name and the word before it? Right now, when I turn off delimiters, and try to expand "youbrb", I get back "yoube right back" (here |
I'm very sorry, it seems I was not saving the delimiter list properly. Now when I clear the list and save, no snippets work. I'm not sure why I was seeing the behavior I want before. I think I will roll back to an earlier version and disable extension updates. It will be simpler for you, since it seems my use case is unusual (?) |
Please don't. Newer versions have lots of upgrades and I would not recommend downgrading. Please send me an example of what you believe is expected behavior, and I will try understand it. Also, the comments got too long, so let us continue this discussion on email ([email protected]). (Also, you can only get old versions from the /releases page in unpackaged form and sync storage doesn't work for unpackaged extensions.) |
sign
andgsign
overlapped, resulting in always onlysign
working.REPORT CAC
andCAC
, so in that case they cannot expand the first one as space is one of the default delimiters (@#$%&*+-=(){}[]:"'/_<>?!.,
).However, removing snippet name delimiters in favor of matching longest snippet name first is not a good idea, because people do have snippets like
s
andds
and it really makes typing literally any other word that containss
ords
impossible.However, people have little to no acquaintance with the snippet name delimiter list, as is shown by their thoughts on the support email, so expecting them to go ahead and modify the snippet name delimiter list to suit their needs is a bad idea.
Hence, solution is to implement an overlap checker feature. Every time the options page loads, it would check all snippets for overlap, and report its findings to the user in a nice dialog box. It would suggest two things: rename the snippet or remove that offending delimiter from the list. Also, it would prevent future creation of overlapping snippets.
Need to come up with some UI for that. I want it to be a non-intrusive yellow box at the bottom of the snippet list, with a corresponding warning arrow at the top ("you have unchecked warnings, scroll below")
The text was updated successfully, but these errors were encountered: