amaxwell01 Posted September 15, 2017 Share Posted September 15, 2017 It would be create to create snippets with multiple cursor locations. Use case: I want to create a snippet with the same value in multiple locations. Example 1: console.log('======================> {cursor}', {cursor}); Example 2: Hello {cusor}, You're invited to the following event. I look forward to hearing from you {cursor} Link to comment Share on other sites More sharing options...
GuiB Posted September 15, 2017 Share Posted September 15, 2017 To have multiple cursors in an application, the application need to allow it and since Alfred snippet expansion are made to be used in any application, this is not possible. Or, Alfred would need a popup interface to edit the snippet before outputting it to the other application (which would be great). However, now with the Snippet Trigger object in Workflows, it is possible to get around this by creating a workflow that ask for the string that you want to insert at multiple places. To give you an example, I think the one at '[+] -> Getting Started -> Snippet Triggers' would give you some good ideas for this kind of things. Look at the third one ('hellomsg') for a way to ask for input and write to the front application. In the Copy to Clipboard object, just use '{query}' multiple time to write the same string at multiple positions... Let me know if it's not clear enough, or here is a simple version showing your Example 2: https://nofile.io/f/R4PJxm45pfc/Write+Query+at+multiple+position+in+Snippet.alfredworkflow 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