briskine icon indicating copy to clipboard operation
briskine copied to clipboard

Cursor position

Open aagha opened this issue 11 years ago • 13 comments

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.

aagha avatar Oct 26 '13 02:10 aagha

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...

xarg avatar Oct 26 '13 09:10 xarg

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'.

xarg avatar Aug 08 '14 16:08 xarg

Every time somebody requests this I'm doing a +1 here.

+1

xarg avatar Jul 11 '15 22:07 xarg

+1

xarg avatar Aug 20 '15 12:08 xarg

+1 from a paying customer

RomainLapeyre avatar Sep 02 '15 21:09 RomainLapeyre

+1

xarg avatar Apr 28 '16 09:04 xarg

For info, has this been ever implemented?

marcomow avatar Jul 13 '18 12:07 marcomow

No

xarg avatar Jul 13 '18 16:07 xarg

It's a pity! Would have been a terrific and time saving feature

marcomow avatar Jul 13 '18 16:07 marcomow

We're accepting PRs :)

xarg avatar Jul 13 '18 17:07 xarg

@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 avatar Sep 15 '22 08:09 DanKaplanSES

@DanKaplanSES thanks the input. I no longer maintain this project. @ghinda I'll let you respond. Thanks!

xarg avatar Sep 15 '22 17:09 xarg

@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.

ghinda avatar Sep 16 '22 05:09 ghinda