如何为组织模式内联源代码src_lang {}语法突出显示? [英] How to syntax highlight for Org-mode inline source code src_lang{}?
本文介绍了如何为组织模式内联源代码src_lang {}语法突出显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用语法突出显示标有 src_ruby {Array.new}
的组织模式内联源代码?
Is there a way to syntax highlight Org-mode inline source code which is marked with src_ruby{Array.new}
?
组织模式是否为此具有默认选项?
还是有其他方法可以做到这一点?
Does Org-mode has default option for this ? Or Is there other method to do this ?
推荐答案
(font-lock-add-keywords 'org-mode
'(("\\(src_\\)\\([^[{]+\\)\\(\\[:.*\\]\\){\\([^}]*\\)}"
(1 '(:foreground "black" :weight 'normal :height 10)) ; src_ part
(2 '(:foreground "cyan" :weight 'bold :height 75 :underline "red")) ; "lang" part.
(3 '(:foreground "#555555" :height 70)) ; [:header arguments] part.
(4 'org-code) ; "code..." part.
)))
这篇关于如何为组织模式内联源代码src_lang {}语法突出显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文