RStudio snippet not working

帅比萌擦擦* 提交于 2019-12-19 17:34:00

问题


I'm utilizing a Macbook pro running "El Capitan" and RStudio is version 0.99.902. I'm writing a Rmd document. I want to utilize the snippets that RStudio has built in and create my own also. By clicking Preference => Code; I can see that "Enable code snippets" is checked. However, while trying to utilize any snippet the completion is not performed. If I typed just r I should get this block of code, but nothing hapen

snippet r
    ```{r ${1:label}, ${2:options}}
    ${0}
    ```

I also create a simple snippet:

snippet dthen
    %>%

None of the markdown snippet seems to work. Do I'm doing something wrong or any setting has to be done?


回答1:


You can invoke code snippets in Markdown in RStudio using Shift+Tab after typing the snippet, but it will not currently prompt you to expand the snippet, either with Tab or by just waiting. I thought this was a bug, but the discussion in this GitHub issue says it's intended, just still-to-be-documented.



来源:https://stackoverflow.com/questions/37748516/rstudio-snippet-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!