DrDannySands Posted July 24, 2023 Share Posted July 24, 2023 I have been looking forward to transitioning to Alfred Snippets from another text expansion program. But try as I might, every snippet expands before I've typed a delimiter (punctuation or space). The option to "Expand snippets mid-string" is unchecked. I have verified this behavior with every snippet I tried. This makes Snippets very difficult to use. Is this a known bug or am I doing something wrong? Alfred 5.1.1 MacOS 13.4 (22F66) Thank you. Danny Link to comment
Vero Posted July 25, 2023 Share Posted July 25, 2023 @DrDannySands You can add a suffix to a snippet or collection, but this needs to be a pre-defined character (e.g. a space, a symbol like 😃 rather than an arbitrary delimiter. Here's how you can set a suffix/prefix for a collection: https://www.alfredapp.com/help/features/snippets/collections/#affix Cheers, Vero Link to comment
DrDannySands Posted July 25, 2023 Author Share Posted July 25, 2023 Hi Vero and thanks for your response. I think my question was unclear. As I understand the Snippets function, a text string is expanded after the snippet is typed. For example if I have a snippet "ty" that I wanted expanded to "thank you" the snippet should expand after I've typed the string "ty" followed by a space or punctuation, but not another letter. ty → thank you But this should not occur if "ty" is part of another word, so that I can type the word "type" without a problem. However that's not what happens. As soon as I type the first 2 letters of "type" it expands to "thank you." type → thank youpe This is not expected behavior, because I unchecked "Expand snippets mid-string" in the options. What am I missing? Link to comment
vitor Posted July 26, 2023 Share Posted July 26, 2023 (edited) Expanding mid-string means “if you’re already in the middle of typing a string”. For a more concrete example, it means that if you have the option off you’d write archetype and it would stay like that, but with the option on it would expand to archthank youtype. Edited July 27, 2023 by vitor Correct on and off Link to comment
DrDannySands Posted July 26, 2023 Author Share Posted July 26, 2023 Yes that was my understanding, as well. That was similar to the example of what is happening to me. But if the box is unchecked the snippet should not expand until I end the string with either a space or a punctuation, right? In your example, with the box unchecked, shouldn't I be able to type the word "archetype" without any problems? Link to comment
vitor Posted July 27, 2023 Share Posted July 27, 2023 5 hours ago, DrDannySands said: But if the box is unchecked the snippet should not expand until I end the string with either a space or a punctuation, right? No, it is expected that it expands as soon as you finish typing the trigger. The mid string concerns where it starts, not where it ends. 5 hours ago, DrDannySands said: In your example, with the box unchecked, shouldn't I be able to type the word "archetype" without any problems? Correct. That’s how it’s working on my end. Link to comment
DrDannySands Posted July 27, 2023 Author Share Posted July 27, 2023 So it's performing as designed? Most text expanders that I have used expand the snippet when end of string is reached. That would be more useful, IMO. Maybe permit that in the future as an option? Thanks. Link to comment
GatorMapi Posted July 27, 2023 Share Posted July 27, 2023 @DrDannySands You can try adding a space before and after the snippet and the keyword. For example, typing 'smarty' whilst your snippet triggers at ty' would expand into something like this 'smarthank you'. It could look something similar to this Link to comment
DrDannySands Posted July 27, 2023 Author Share Posted July 27, 2023 Good thought, @GatorMapi, but that's too much work (and wouldn't allow expansion with punctuation). It will be easier to just use a 3rd party app (as I was doing before). Link to comment
GatorMapi Posted July 27, 2023 Share Posted July 27, 2023 @DrDannySandsYou could try adding a custom prefix for each defined type of snippet. For example I have 3 snippets tied to a phone number 'ph1' expands into 8005551111 '-ph1' expands into 800-555-1111 '(ph1)' expands into (800) 555-1111 Link to comment
DrDannySands Posted July 27, 2023 Author Share Posted July 27, 2023 (edited) That's clever @GatorMapi. But again too much trouble. With the previous text expanders I have used, I can have a snippet "ty" that is set to expand to "thank you." Then the following automatically works: ty → thank you Ty → Thank you Ty. → Thank you. type → type [no expansion] archetype → archetype [no expansion] Edited July 27, 2023 by DrDannySands Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now