Jump to content

Snippets {cursor}


Recommended Posts

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

@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
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
  • 4 years later...
  • 3 weeks later...
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...