jlelong / LaTeX-Workshop-wiki

Public repo for contributing to https://github.com/James-Yu/LaTeX-Workshop/wiki
6 stars 35 forks source link

Add the introduction about configuring user snippet #101

Closed SwitWu closed 1 year ago

jlelong commented 2 years ago

Thanks for your PR.

Maybe, you could just refer to https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets to explain how to create personal snippets rather than giving your own example with $...$ especially as inserting inline math using $...$ is usually considered as bad practice. Instead, you should use \(...\), see https://tex.stackexchange.com/questions/510/are-and-preferable-to-dollar-signs-for-math-mode

LucunJi commented 1 year ago

This does not work with other formats, such as .Rnw (Sweave or knitr file). My solution is to create a plugin for this and add my snippets to all related languages. I don't know if there should be such a feature (one user snippet for all) in LaTeX-Workshop, but that's probably out of scope of this repo for wiki.