ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
180 stars 22 forks source link

Tabstops feature added and dependencies fixed #7

Closed Arax20 closed 3 years ago

Arax20 commented 3 years ago

Tabstops

Added tabstops feature to allow jumping to cursor locations within snippet. Use the trigger shortcut without an eligible target to trigger jump.

Added option to use Tab as the trigger shortcut. Without any eligible jump points or expansions, Tab will behave normally.

Fixed Build bugs

ArianaKhit commented 3 years ago

It looks like Use Tab setting is working fine, but Tabstop isn`t working. Can you show your snippet example?

Arax20 commented 3 years ago

My snippets are:

frac : \frac{ <end> }{ <++> } <++>
tf : \therefore <end>
rm : \mathrm{ <end> } <++>
un : _{ <end> } <++>
math : $$<nl><end><nl>$$
sqrt : \sqrt{ <end> } <++>

with my "Stop Symbol" set to <++> so whenever I use the hotkey Ctrl + Tab I jump to the next <++> like in the demo gif:

demo

*Note: my newline and end symbols are <nl> and <end> respectively since I use a lot of latex it's less confusing this way