![](/img/trans.png)
[英]Emacs org-mode python blocks have 5 space tabs, but I want 4 space tabs
[英]I want python style comments in my emacs mode
我正在為我自己的語言制作一個 emacs 模式,我的語言有 python 喜歡評論,
例子
func hello_world()
printh("Hello, World") # this prints hello world
end
在此示例中,我希望 # 之后的所有內容都改變顏色,例如注釋。
現在,我能夠弄清楚如何在 emacs 中突出顯示 c/c++ 類型的評論,但我無法理解如何為 python 類型的評論做
// this comment will be highlighted
# but I want this type of comment to be highlighted
在語法高亮定義中使用以下內容:
("#.*" . font-lock-comment-face)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.