emacs - 如何为 Org 模式内联源代码 src_lang{} 突出显示语法?

标签 emacs syntax syntax-highlighting highlight org-mode

有没有办法语法高亮标有 src_ruby{Array.new} 的 Org 模式内联源代码?

Org-mode 有默认选项吗?
或者有其他方法可以做到这一点吗?

最佳答案

更新:这个特定问题的正确答案是在 https://stackoverflow.com/a/28059832/462601 之后。此处提供的答案与此问题 Syntax highlighting within #+begin_src block in emacs orgmode not working 相关

你的意思是像缓冲区中的语法高亮源块?

#+BEGIN_SRC ruby
Array.new
#+END_SRC

您需要设置 (setq org-src-fontify-natively t)
引用:http://orgmode.org/worg/org-contrib/babel/examples/fontify-src-code-blocks.html

关于emacs - 如何为 Org 模式内联源代码 src_lang{} 突出显示语法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20309842/

相关文章:

regex - 正则表达式组中问号和 x 的含义

emacs - 如何设置 emacs 框架背景颜色?

Emacs - 如何安装和使用 dired+?

emacs - org--agenda-prefix-format %?不起作用

macos - Git rebase 错误 : This application will not run on your computer

css - 字符串中 CSS 选择器的代码高亮

相当于 perl -cw 的 Python 语法检查

css - 为什么CSS在规则中使用冒号 ":"?

c - 等式 "*x_ptr = &x "中每个变量的伪代码翻译是什么?

syntax-highlighting - Notepad++ 在任何 <% 的 Mako Templates 标签之后都会丢失高亮的 HTML 标签。如何禁用此行为?