ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
180 stars 22 forks source link

Allow expansion also when directly at end of word, not just when ON it #4

Closed Moonbase59 closed 3 years ago

Moonbase59 commented 3 years ago

When typing in an empty line, you can type a shortcut, hit the hotkey and it’ll expand. Fine and natural.

When editing a text, inserting a shortcut and then pressing the hotkey, nothing happens, not even if the shortcut is followed by white space—you have to go back at least one character to be "on" the shortcut word, then hit the hotkey and it works. This feels quite annatural and hinders productivity.

Could it be made so that it expands

Example (| shall symbolize the cursor, key shall be the shortcut):

ArianaKhit commented 3 years ago

The problem is fixed, now it works as it should. The shortcut is replaced when the cursor is on the word or at the beginning/end.

Moonbase59 commented 3 years ago

Fantastic. Thanks a lot for fixing!