sots Posted November 18, 2021 Share Posted November 18, 2021 Possible to associate more than one snippet with the same keyword? This is possible in aText, and I find it very useful: In aText all my email addresses are associated with the same keyword (;;em) Then, when I type the keyword, I am presented with a menu/dialog with all the email addresses Much easier than having to create/remember a unique keyword for each email address I have not found a way to do the same in Alfred—or have I missed something? Many thanks! Link to comment
Andrew Posted November 18, 2021 Share Posted November 18, 2021 This is a perfect job for a Workflow with a Snippet Trigger. Set the List Filter to "Argument Optional" and add in all the snippets as list items. The arg for each list item will be the snippet content. Set the Copy to Clipboard to "Automatically Paste". When you type the snippet keyword, Alfred will automatically popup with a search box for the snippets you set in your List Filter. Cheers, Andrew Link to comment
sots Posted November 18, 2021 Author Share Posted November 18, 2021 Bravo! V. cool. TY Link to comment
Vero Posted January 7, 2022 Share Posted January 7, 2022 @sots Thanks for inspiring a blog post; It essentially reiterates what Andrew already suggested above, but in more details! https://www.alfredapp.com/blog/guides-and-tutorials/single-keyword-for-multiple-snippets-workflow/ Cheers, Vero giovanni 1 Link to comment
arrelid Posted November 19, 2022 Share Posted November 19, 2022 Hi there! I tried this today, and it seems like Alfred has got some problems replacing the trigger snippet (e.g. "'\\mysnippettobereplaced") with whatever I pick from the (filter) list. This can easily be reproduced with the built-in "Getting Started > Snippets Trigger" workflow - see e.g. the \\thanksmsg snippet. Typing the snippet string in question does indeed bring up the list filter, but Alfred doesn't manage to successfully replace the full snippet itself when it pastes whatever is selected in the list. Expected: Type \\thanksmsg in e.g. TextEdit.app, and Alfred shows the list. Select something from the list, and the snippet in TextEdit.app is replaced with whatever I picked from the list. Actual: I end up with something like "\\thanksmThat's fantastic! ..." in TextEdit This is on macOS Ventura, 13.0.1 (22A400). Anyone else or just me? Link to comment
vitor Posted November 19, 2022 Share Posted November 19, 2022 (edited) @arrelid See Snippets and Text Expansion Troubleshooting. Edited November 19, 2022 by vitor Link to comment
arrelid Posted November 19, 2022 Share Posted November 19, 2022 3 hours ago, vitor said: @arrelid See Snippets and Text Expansion Troubleshooting. Slowing down the simulated key event speed made the trick - thank you sir! 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