medienbaecker Posted June 18, 2019 Share Posted June 18, 2019 (edited) I'm a frequent user of the snippets feature. Sadly I can't really use it in https://www.sketch.com/ as it always pastes plain text as Helvetica, 12pt. Is there anything Alfred (or I) can do to fix this? Does something similar happen in other apps? Copying the text, pressing CMD + Z and pasting it again will paste it as plain text. I also often type the snippet in Alfred, copy the text and paste it into Sketch. That works too, but it's not quite as clean and productive as directly using snippets in the app. macOS Mojave 10.14.5 / Alfred 4.02 / Sketch 53.2 Edited June 23, 2019 by medienbaecker Not solved after all Link to comment
medienbaecker Posted June 18, 2019 Author Share Posted June 18, 2019 Ah, I think I know why this happens: Sketch changes up the Paste / Paste as Rich Text shortcuts. I fixed that by adding the reverse shortcuts to the Keyboard → Shortcuts settings: Link to comment
medienbaecker Posted June 23, 2019 Author Share Posted June 23, 2019 Sorry for the monologue… I noticed that changing the "Paste" shortcut (obviously) has some disadvantages. For example inserting images etc. will be changed to ⌥⇧⌘V too. Could Alfred detect Sketch and use the normal paste shortcut instead of the ⌥⇧⌘V one? Link to comment
deanishe Posted June 23, 2019 Share Posted June 23, 2019 (edited) 2 hours ago, medienbaecker said: Could Alfred detect Sketch and use the normal paste shortcut instead of the ⌥⇧⌘V one? Technically, yes, but I think you should be asking Bohemian to change Sketch's non-standard behaviour instead of asking the developers of other applications to work around it. This isn't unique to Alfred and Sketch. It's how Sketch—in contrast to basically every other application—treats any pasted plaintext, and so you have the same problem using Sketch with every snippet expansion app, clipboard manager etc. Edited June 23, 2019 by deanishe Link to comment
medienbaecker Posted June 23, 2019 Author Share Posted June 23, 2019 5 hours ago, deanishe said: Technically, yes, but I think you should be asking Bohemian to change Sketch's non-standard behaviour instead of asking the developers of other applications to work around it. This isn't unique to Alfred and Sketch. It's how Sketch—in contrast to basically every other application—treats any pasted plaintext, and so you have the same problem using Sketch with every snippet expansion app, clipboard manager etc. I totally agree. Bohemian's decision to flip the paste shortcuts is super frustrating. Nevertheless, it's not the case with every snippet expansion app. I just installed aText to test this: Somehow, aText seems to paste "cleaner" snippets without formatting. Similar to my aforementioned fix: I expand the snippet in the Alfred input, copy it and then paste it into Sketch. Link to comment
deanishe Posted June 23, 2019 Share Posted June 23, 2019 (edited) Interesting. By the looks of it, aText simulates typing rather than putting the snippet on the clipboard and pasting it. If you turn on the below option it also does the Helvetica 12pt thing. After a bit of testing, it looks like aText switches to using the clipboard after a certain length (simulating typing is a lot slower than pasting). Edited June 23, 2019 by deanishe Link to comment
medienbaecker Posted June 23, 2019 Author Share Posted June 23, 2019 28 minutes ago, deanishe said: aText simulates typing You're right — after enabling the clipboard checkbox I once again get Helvetica, 12pt. Seems like simulating keystrokes is the only solution then — apart from detecting Sketch. Is this something Alfred could do? After some more research on Sketch boards/subreddits, I doubt Bohemian will ever change the paste behaviour. Link to comment
deanishe Posted June 23, 2019 Share Posted June 23, 2019 Just now, medienbaecker said: Is this something Alfred could do? In what sense? Something you could do with Alfred or something Andrew could rewrite Alfred's snippet engine to do? 1 minute ago, medienbaecker said: After some more research on Sketch boards/subreddits, I doubt Bohemian will ever change the paste behaviour. Huh. Did they give a reason? Link to comment
medienbaecker Posted June 23, 2019 Author Share Posted June 23, 2019 7 minutes ago, deanishe said: Something you could do with Alfred or something Andrew could rewrite Alfred's snippet engine to do? I don't know if such a feature would help with other issues or other apps. I noticed aText's method is quite a lot faster for short snippets. Of course it would be a total overkill just to get this one stupid app working. There's no possibility to override the snippets functionality via workflows or so, right? 15 minutes ago, deanishe said: Huh. Did they give a reason? Not exactly. I just noticed it took them years to even add the possibility to choose between rich text and plain text. I'll definitely try my luck, though! Thanks for your help @deanishe! Link to comment
deanishe Posted June 23, 2019 Share Posted June 23, 2019 1 minute ago, medienbaecker said: I don't know if such a feature would help with other issues or other apps. I noticed aText's method is quite a lot faster for short snippets. Of course it would be a total overkill just to get this one stupid app working. Yeah, I think that's a good summary of the situation. It's not a simple change, so I couldn't really see Andrew implementing it unless it fixed issues with several applications. I've been thinking about this a bit, and what you could do is write a simple workflow that types the text you enter into Alfred. So, you'd run your workflow (probably via a Hotkey), expand the snippet in Alfred's query box, and then when you hit ↩, the workflow inserts the snippet in the active app by typing it instead of pasting it. 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