ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
180 stars 22 forks source link

FR: Could "cursor position after insert" be added? #3

Closed Moonbase59 closed 3 years ago

Moonbase59 commented 3 years ago

I love this plugin. It’s simple, does what I need and nothing more. Thanks for making it!

Here’s a feature I miss after using it for a while: Would there be a way to place the cursor after inserting the replacement text?

I use it a lot for things like <kbd></kbd> and it would just be great if the cursor could be placed inside the HTML tags, for instance.

Maybe some "special text" could be put inside the replacement text, like

kbd : <kbd><|></kbd>

The engine could then check for <|>, remove it, and place the cursor there?

To make it ultra-flexible, you could even make the "cursor here" string a setting, so users could have their own preferences, maybe $END$ or whatever.

ArianaKhit commented 3 years ago

I'm glad you found it useful. This feature is already aviable in the new release, and also Cursor end position mark can be customized in settings (by default $end$).

Thank you for your feedback!

Moonbase59 commented 3 years ago

Tested with v0.0.3 and works a treat! Thanks for implementing this!