artisticat1 / obsidian-latex-suite

Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
MIT License
1.28k stars 52 forks source link

[Feature Request] Disable snippets when writing Latex commands #68

Open mscott99 opened 1 year ago

mscott99 commented 1 year ago

If the cursor is positioned as “\blahblahbl”, disable the snippet completion. This could be done with a regex that checks that there is a backslash followed by text not separated by spaces.

The reason for this is to be able to write things manually for less-often used symbols. For example, \land triggers the “and” snippet for me, so I write the “d” first and then the rest before it to avoid triggering the snippet. I know that this can be fixed by customizing the snippets shortcuts, yet I think this would still be a powerful feature.

artisticat1 commented 1 year ago

Sure, I can consider this for a future release.

In the meantime you can simply use Ctrl+Z to undo the expansion of the snippet. This will take you back to \land.

artisticat1 commented 1 year ago

Making the "and" snippet a word boundary snippet will also stop it from triggering when typing \land.

mscott99 commented 1 year ago

Oh nice thanks for the tips!