joeyuping / quick_latex_obsidian

MIT License
326 stars 21 forks source link

Feature request: a "smarter" auto enclose #32

Closed AwePhD closed 2 years ago

AwePhD commented 2 years ago

Hello,

First of all, thanks for your plugin, it's game changer :)

There is a minor thing which annoys me with the plugin and the auto enclose ($ or $$). When I'm done with typing my expression - let's say I typed $x|$ where | is the position of my cursor - I cannot close the LaTeX expression with typing $. When I am in an expression (just before the closing $, with text behind) I think it would be great that typing $ moves the cursor after $. Namely: $x|$ (end of typing) -> type '$' -> $x$| . Namely ($$ edition): $$x|$$ (end of typing) -> type '$' -> $$x$$| .

Right now, I must use the right arrow key to move the cursor and it's not very convenient IMO.

Please let me know what do you think about it :) Have a nice day!

Lucid-A commented 2 years ago

Having the same issue.

And I'd like to put forward another feature for convenience. When inserting multiline equations, which usually use "$$" to enclose, it's more helpful to insert an extra line between after striking enter.

Namely: $$ $$ -> (striking enter) -> $$

$$ ps: '|' is the position of my cursor

Finally, I also wants to express my sincere gratitude to you for making this plugin, which greatly improve the experience of inputing formula. Thanks.

joeyuping commented 2 years ago

Hi @AwePhD @Lucid-A !

Thank you all for the great suggestions! I have released a new version with these functionalities incorporated. Please take a look~