roads Posted February 14, 2015 Share Posted February 14, 2015 dear mom and dad, a dynamic I miss is to place the cursor at a defined place in the snipet after it gets pasted. Is that funcionality in there and I just missed it? Link to comment
Tyler Eich Posted February 15, 2015 Share Posted February 15, 2015 No, this functionality does not exist in Alfred. As I understand, placing the cursor in a text snippet is much less reliable than pasting (which Alfred does now). It would require using OS X's Accessibility API to actually simulate moving the cursor, which feels like a hack. Link to comment
roads Posted February 15, 2015 Author Share Posted February 15, 2015 (edited) Apps like typinator can do this, I think even Launchbar can by placing a {^}. So we don't misunderstand each other, the feature request is to paste the snippet and have the cursor jump to the desired point within the snippet. I think you think I mean wargames like cursor typing which I am not. Edited February 15, 2015 by roads Link to comment
Andrew Posted February 15, 2015 Share Posted February 15, 2015 As Tyler suggests, Alfred doesn't use OS X's Accessibility features for text interaction, and as such, cannot reposition the cursor after pasting. Having said that, depending on what you need to do, you could create a workflow which pastes a text snippet and populates additional text within the snippet in place (I assume that's why you want to reposition the cursor?) Cheers, Andrew Link to comment
roads Posted February 16, 2015 Author Share Posted February 16, 2015 (edited) What I need it for Andrew is to adjust the snippet.Cursor movement is time consuming maybe even needs scrolling. Using the mouse is the option which isnt automatic either. A simple example would be. Dear <place cursor here> blablabla kind regards, Peter Edited February 16, 2015 by roads Link to comment
deanishe Posted February 23, 2015 Share Posted February 23, 2015 You'd probably do better to look at a dedicated snippet-expansion application for that (Typinator, TextExpander etc.). Link to comment
roads Posted February 23, 2015 Author Share Posted February 23, 2015 Yeah I already use Typinator for years but I hoped I could drop it using Alfred. Also there is no Menu choice for snippets in Typinator. Link to comment
deanishe Posted February 23, 2015 Share Posted February 23, 2015 Understood. Does Typinator support AppleScript automation? I use TextExpander, and it would be pretty easy to write a workflow for that using its AppleScript support. Link to comment
roads Posted February 23, 2015 Author Share Posted February 23, 2015 Yes look here http://www.ergonis.com/downloads/extras/typinator/scripting_extras/Creating%20Typinator%20Scripts.pdf But I wont be able to write a worklow for it. What would it do deanishe? Link to comment
deanishe Posted February 23, 2015 Share Posted February 23, 2015 That's the wrong kind of API. That's how to write scripts for Typinator to run. The app needs to support being scripted to write a workflow for it. For TextExpander, for example, it'd be pretty easy to write a workflow that could search your snippets by name/abbreviation and trigger them from within Alfred. Helpful if you often forget the abbreviations. Link to comment
benjaminwood Posted May 17, 2016 Share Posted May 17, 2016 Now that Alfred 3 supports text expansion, and uses OS X's Accessibility features, is it possible to place the cursor? In the past I've used textExpander for this, but I'm looking forward to getting rid of it as soon as alfred can support placing the cursor. :-) Link to comment
Vero Posted May 17, 2016 Share Posted May 17, 2016 Now that Alfred 3 supports text expansion, and uses OS X's Accessibility features, is it possible to place the cursor? In the past I've used textExpander for this, but I'm looking forward to getting rid of it as soon as alfred can support placing the cursor. :-) This isn't currently possible but it is something we'll be keeping an eye on. Cheers, Vero Link to comment
benjaminwood Posted May 17, 2016 Share Posted May 17, 2016 Vero, thanks for your response! I tweeted at you as well, you can disregard. :-) Loving alfred 3 so far. Hope that you can add cursor placement support to text expansion in the future! :-) Link to comment
andy Posted May 18, 2016 Share Posted May 18, 2016 I'd like to see this feature too. I'm using atext and usually use cursor placement in to speed up my coding workflow. Here's some of my snippet examples : <!-- {cursor} --?> <div class="{cursor}"></div> <p>{cursor}</p> Link to comment
_Sascha_ Posted May 19, 2016 Share Posted May 19, 2016 Oh, I thought this would already be implemented when I saw the first time the new snippet-feature announcement. Would like to see this in the new snippet-insertion feature, too! Examples: 1. Define (single) target of cursor <p>{cursor}</p> 2. Define (multiple) targets to jump for cursor Jumping via TABulature hotkey. for({cursor_pos0}; {cursor_pos1}; {cursor_pos2}) { {cursor_pos3} } Have a nice day! Link to comment
raguay.customct Posted May 25, 2016 Share Posted May 25, 2016 Oh, I thought this would already be implemented when I saw the first time the new snippet-feature announcement. Would like to see this in the new snippet-insertion feature, too! Examples: 1. Define (single) target of cursor <p>{cursor}</p> 2. Define (multiple) targets to jump for cursor Jumping via TABulature hotkey. for({cursor_pos0}; {cursor_pos1}; {cursor_pos2}) { {cursor_pos3} } Have a nice day! Cursor movement like this is best done in the editor itself. For example, Sublime Text allows snippets to have many cursor locations and you tab to each one to fill them in. That would never work for any generic application. It works for Sublime because the program is in complete control of itself already. It's not hacking the UI to get an effect. My Quiver Snippet workflow (and the plain file version as well) uses Keyboard Maestro or TextExpander (which I quit supporting since I no longer use it) to move the cursor to a single location. The Keyboard Maestro solution is buggy since it is forcing the back arrow key. For short distances, it does fine. But for a lot of text, it misses quite often. Part of the bugs is that you are not sure when the system will paste the text to start the backtracking. When the system is running hard, even TE got it wrong a lot of the time. But, multiple locations would never work by stuffing the input buffer as these programs do. 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