emacs orgmode 中#+begin_src 块中的语法突出显示不起作用 [英] Syntax highlighting within #+begin_src block in emacs orgmode not working

查看:27
本文介绍了emacs orgmode 中#+begin_src 块中的语法突出显示不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了许多不同的语言并复制了各种示例,但是我在 orgmode 中的代码块都没有语法高亮显示.这是我正在尝试的:

I have tried many different languages and copied various examples, but none of my code blocks within orgmode get syntax highlighting. Here is what I'm trying:

#+begin_src python

def main():
  print "Hello %s" % ("what's the problem")

#+end_src

#+begin_src c++

for (int i = 0; i < 30; i++) 
{
  cout << "Hello" << endl;
}

#+end_src

当导出为 HTML 时,它显示在源代码块中,但也没有突出显示.

When exported to HTML, it shows up in a source code block, but with no highlighting there either.

我使用的是最新的组织 (7.8.10).我在这里遗漏了什么吗?

I am using the newest org (7.8.10). Am I missing something here?

推荐答案

你有这个吗?

(setq org-src-fontify-natively t)

这篇关于emacs orgmode 中#+begin_src 块中的语法突出显示不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆