briskine
briskine copied to clipboard
Cursor position
Is there a tag I can use to position the cursor in a specific part of my quicktext once I've executed it?
I'm thinking I'd like to have some email templates, and after I've auto-completed, have the cursor move to after the "Hi" field so I can just start typing rather than needing to re-position the cursor.
There is no tag that can do this at the moment, but I think this is an excellent idea and totally doable. Something like:
Hi <% cursor %>,
The rest of the quicktext...
I was thinking and I think that multiple cursor positions should be supported. Something like:
Hello {{cursor}},
The template with it's text...
{{cursor}} which is where we stop the second time if we hit the 'Tab' key.
End of the template: {{cursor}} the end, no need to put the cursor in any other places.
The role of {{cursor}} is to 'eat' a 'Tab' key and stop there. Once all the 'Tab' keys have been 'eaten' normal operation of the Tab should be resumed. Another word for each would be 'tabindexed'.
Every time somebody requests this I'm doing a +1 here.
+1
+1
+1 from a paying customer
+1
For info, has this been ever implemented?
No
It's a pity! Would have been a terrific and time saving feature
We're accepting PRs :)
@xarg I don't love the way this is implemented in VS Code, but it might be worth checking out, because their approach to doing it adds some additional flexibility: https://code.visualstudio.com/docs/editor/userdefinedsnippets
@DanKaplanSES thanks the input. I no longer maintain this project. @ghinda I'll let you respond. Thanks!
@DanKaplanSES thanks for tip. We'll probably implement something similar to Tabstops.
We'll also implement "form" support in the future, so the rest of the functionality like Placeholders or Choice will be included there to keep tabstops as simple as possible.