sudopeople Posted March 15, 2021 Share Posted March 15, 2021 (edited) I start with something in my clipboard. I use one of my snippets in Alfred that utilizes the {clipboard} keyword to take what's currently in my clipboard and injects it into the snippet text then pastes it. When I execute the snippet presumably, it copies the snippet into the system clipboard then pastes it into the foreground application. The issue I face is that my clipboard is now overwritten with the snippet text, not my original text. I'm not able to quickly reuse my snippet again, since the initial text is now different. When I execute the snippet in this state I get compounded recursive text pasted and ever expanding clipboard contents whet the snippet is used repeatedly. Example: I start with the text "watermelon" in my clipboard. My snippet is: "My favorite fruit is {clipboard}." When I execute the snippet, it's pasted as intended, but the clipboard now contains the text: "My favorite fruit is watermelon." When I execute the snippet again, the text pasted is: "My favorite fruit is My favorite fruit is watermelon.." I recommend an option (checkbox) be added to the bottom of the edit snippet screen that says, "Preserve initial clipboard contents" or "Do not write to clipboard" or "Prevent overwriting clipboard" or something to that effect, like so: Edited March 15, 2021 by sudopeople Link to comment Share on other sites More sharing options...
deanishe Posted March 15, 2021 Share Posted March 15, 2021 22 minutes ago, sudopeople said: I recommend an option (checkbox) be added to the bottom of the edit snippet screen that says, "Preserve initial clipboard contents" or "Do not write to clipboard" or "Prevent overwriting clipboard" or something to that effect, like so: Alfred already restores the clipboard. You're almost certainly having a timing issue. Try adjusting "Restore after" in "Auto Expansion Options": sudopeople 1 Link to comment Share on other sites More sharing options...
sudopeople Posted March 15, 2021 Author Share Posted March 15, 2021 Quote Alfred already restores the clipboard. You're almost certainly having a timing issue. Try adjusting "Restore after" in "Auto Expansion Options" Ahh, I don't use Auto Expansion, so I never thought to look in its options. So (even without "Automatically expand snippets by keyword" enabled) I was indeed able to get the behavior I described above by checking "Restore clipboard contents: After Snippets Viewer or Keyword" in the Auto Expand Options configuration pane, pictured below: Thanks very much, @deanishe Link to comment Share on other sites More sharing options...
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