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

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

问题描述

我已经尝试过许多不同的语言并复制了各种例子,但是orgmode中的代码块中没有一个语法突出显示。这是我正在尝试的:

 #+ begin_src python 

def main():
打印Hello%s%(什么问题)

#+ end_src

#+ begin_src c ++

for int i = 0; i <30; i ++)
{
cout<< Hello<< ENDL;
}

#+ end_src

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



我正在使用最新的组织(7.8.10)。我在这里缺少一些东西吗?

解决方案

你有这个吗?

 (setq org-src-fontify-natively t)


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

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

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

解决方案

Do you have this?

(setq org-src-fontify-natively t)

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

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