简体   繁体   English

如何在Emacs + ESS中的Rmarkdown文档上运行拼写检查?

[英]How do I run spell check on an Rmarkdown document in Emacs + ESS?

Emacs with ESS makes a great IDE for R , even better with polymode-R and polymode-markdown . 带有ESS的Emacs使R成为了一个出色的IDE,使用polymode-Rpolymode-markdown甚至更好。

When working with Rmarkdown ( *.Rmd )files I haven't been able to find an easy way to spellcheck the text components. 当使用Rmarkdown( *.Rmd )文件时,我还没有找到一种简单的方法来对文本组件进行拼写检查。

How can I spellcheck just the running text in an Rmd document? 如何仅对Rmd文档中的正在运行的文本进行拼写检查?

You can customize the regions to be ignored by ispell . 您可以自定义ispell忽略的区域。 For .Rmd files 对于.Rmd文件

(add-to-list 'ispell-skip-region-alist '("^```" . "```$"))

should do the trick. 应该可以。 You can then spell check the buffer with ispell-buffer and it will skip your code blocks. 然后,您可以使用ispell-buffer对缓冲区进行拼写检查,它将跳过您的代码块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM