我正在为LaTeX的VSCode中的个人片段设置一个文件。有没有办法把占位符(语法:${1:foo}
(和普通大括号组合起来?在我的示例中,我希望我的代码输出:fcolorbox {frame}{background}{text}
其中每个变量都是占位符。我生成的代码片段(.json(如下所示:
"Colorbox fcolorbox": {
"prefix": "colbox",
"body": [
"\fcolorbox ${{1:frame}}${{2:background}}${{3:text}}"
],
"description": "Colorbox fcolorbox"
}
但不起作用,因为它将$和{}输出并解释为LaTeX符号。有没有办法解决这个问题,让占位符发挥作用?
这会产生请求的结果:fcolorbox {frame}{background}{text}
"Colorbox fcolorbox": {
"prefix": "colbox",
"body": [
"\fcolorbox {${1:frame}}{${2:background}}{${3:text}}"
],
"description": "Colorbox fcolorbox"
}