sta*_*ner 8 syntax emacs syntax-highlighting highlight org-mode
是否有一种方法可以突出显示标有的Org-mode内联源代码的语法src_ruby{Array.new}
?
组织模式是否有默认选项?或者还有其他方法吗?
小智 13
更新:这个特定问题的正确答案是/sf/answers/1964188271/.这里给出的答案与此问题有关.在emacs orgmode中#+ begin_src块内的语法突出显示无法正常工作
你的意思是像缓冲区中的语法高亮源块一样?
#+BEGIN_SRC ruby
Array.new
#+END_SRC
Run Code Online (Sandbox Code Playgroud)
你需要设置 (setq org-src-fontify-natively t)
参考:http://orgmode.org/worg/org-contrib/babel/examples/fontify-src-code-blocks.html
(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.
)))
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5280 次 |
最近记录: |