如何调用rstudio中的rmarkDown文档的自定义代码段
很少有人可以在rstudio中用于rmarkDown文档。我通过全球选项定义了自己的片段>代码>编辑片段>降价。但这无效。如果我键入r
并按Shift+Tab,则插入预定义的摘要。但是,当我想插入自己的片段时,它不起作用。例如,这是我想拥有的片段:
snippet custy
:::{custom-style="${1:style}"}
${0}
:::
我想在键入custy
和按Shift+Tab时,将摘要插入我的文档中,但事实并非如此。摘要是否应以不同的方式定义?
There are few pre-defined snippets one can use in RStudio for Rmarkdown documents. I define my own snippets via Global Options > Code > Edit snippets > Markdown. But it doesn't work. If I type r
and press Shift+Tab a pre-defined snippet is inserted. But when I want to insert my own snippet it doesn't work. For example, this is my snippet I'd like to have:
snippet custy
:::{custom-style="${1:style}"}
${0}
:::
I thought when I type custy
and press Shift+Tab the snippet will be inserted into my document, but it doesn't. Should the snippet be defined differently?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尝试了您的剪切,效果很好。
确保您在“ Markdown”选项卡上。另外,凹痕还可以吗?片段应为蓝色。
I tried your snipped and it worked well.
Make sure you are on the "Markdown" tab. Plus, are indentations OK? the snippet should be colored blue.