ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
177 stars 21 forks source link

Wrong cursor position after inserting a snippet #62

Open scruel opened 1 year ago

scruel commented 1 year ago

Try the following snippet:

test : ##`$end$`$nl$

The cursor won't be placed as it should be.

By the way, the section about the difference between “Stop Symbol” and “Cursor end position mark” is a little vague, can you describe it in more detail? Thanks.

antsam23 commented 1 year ago

Hi, if you want the cursor in a specific position you have to use the Stop Symbol feature. I've just tried it.

scruel commented 1 year ago

Hi, if you want the cursor in a specific position you have to use the Stop Symbol feature. I've just tried it.

$end$ is not the "stop symbol" you mentioned in your reply?? Also tried $tb$, it won't work as I excepted, the cursor will be placed before `` instead of be placed in it.

antsam23 commented 1 year ago

Hi, I show you an example: html : ```html$nl$$tb$$nl$``` I type html and press my shortcut. It's important to repeat the dollar symbols when you concatenate multiple operators.

  1. add ```html in the first line
  2. insert a new line with $nl$
  3. set cursor position here with $tb$
  4. insert a new line with $nl$
  5. close my code block adding ```
scruel commented 1 year ago

@antsam23 Please do not fork an issue, your reply is not related...

antsam23 commented 1 year ago

I just wanted to help, and it works for me