Skip to content

Snippet cursor placement #1054

Closed
Closed

Description

@michaelpomogajko

Describe the feature and the current behavior/state.
Would be nice, when creating a snippet, one could choose where to place the cursor, after snippet has been expanded.
Alfred 4 has this feature, which is the only reason I'm hesitating to switch.

Right now, cursor is always at the end of the expanded snippet.
Will this change the current API? How?
Snippet editor needs a way to tell where the cursor should go. Like in Alfred 4, one could write {cursor} inside the snippet so it nows exactly where to go.
eg.
snippet keywoard: ;cl
snippet: console.log({cursor});
-> places the cursor inside parentheses after expansion
Who will benefit from this feature?
Everyone ;)
Any Other info.

Activity

  1. added
    api
    feature request
    on Mar 9, 2022
  2. fe9lix commented on Mar 9, 2022

    @fe9lix
    Contributor

    Hey @MishaFrenkman – could you report this through Raycast's feedback command? (It's unrelated to the API...)

  3. aurawindsurfing commented on Jun 8, 2022

    @aurawindsurfing
    Contributor

    @MishaFrenkman I second that request, it should be part of snippets as well as {clipboard}

  4. michaelpomogajko commented on Jun 8, 2022

    @michaelpomogajko
    Author

    @aurawindsurfing it's shipped in the latest updated

  5. aurawindsurfing commented on Jun 8, 2022

    @aurawindsurfing
    Contributor

    nice one!

  6. added a commit that references this issue on Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apifeature request

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions