XPLOT1ON Posted October 13, 2017 Share Posted October 13, 2017 When I paste using snippets and use {cursor} to change the cursor position, the cursor does not jump to the correct position. even with auto expand enabled I can reproduce this issue in Atom, IntelliJ Ultimate as far as I've tested (Both are running latest version as of this post) and running on High Sierra Link to comment
Vero Posted October 13, 2017 Share Posted October 13, 2017 @XPLOT1ON Welcome to the forum! Could you please try your snippet in a native simple app like TextEdit? If the cursor behave as expected there, but not in Atom (which I believe we've heard reports was misbehaving sometimes), you may be limited by the third party app's behaviour. You can try slowing down key events in Features > Snippets > click the cog in the top right > Tweaking, which may give a slower app time to complete the actions. Cheers, Vero Link to comment
XPLOT1ON Posted October 13, 2017 Author Share Posted October 13, 2017 @Vero TextEdit and Notes seems to behave correctly. Is it normal for snippet to scroll line by line rather than jump to where the cursor needs to be? I guess it's probably OS/App limitation. Link to comment
Andrew Posted October 13, 2017 Share Posted October 13, 2017 @XPLOT1ON if the app which is being pasted in to alters the text in some way (e.g. adding new lines), then Alfred won't be aware of this and the cursor placement will be in the wrong location. This has been known to happen in Google Documents, and some non-standard Apple software. Link to comment
deanishe Posted October 16, 2017 Share Posted October 16, 2017 On 13/10/2017 at 9:10 AM, XPLOT1ON said: Atom, IntelliJ Ultimate These are both non-native applications, so all bets are off regarding correct interaction with the system and/or native applications. It's up to the developers of those apps to make them behave like good macOS citizens, and they often don't or can't. Java applications in particular have a long history of not working properly with snippet apps because of the way the Java clipboard interacts with the system one. I suggest you use their own built-in snippet functions. They will not only work more correctly, but they are also much more powerful due to being fully-integrated with the applications. External snippet apps have to use the clipboard and simulated keystrokes to do their thing. They can't come close to a built-in snippet engine that can manipulate the editor component directly via its API. Link to comment
goldenmeanie Posted December 3, 2021 Share Posted December 3, 2021 This is an issue in #slack too 😢 Link to comment
Vero Posted December 20, 2021 Share Posted December 20, 2021 On 12/3/2021 at 2:57 PM, goldenmeanie said: This is an issue in #slack too 😢 Slack has its own snippet tool and alters what you paste itself, so you can take a look at Slack preferences to see if you can stop it from manipulating your text content. Otherwise, as I suspect you'll want to keep Slack's own snippets available, you can split a snippet into two (e.g. [first block of snippet that ends where you'd want the cursor to be] type your free text [second snippet]) 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