创建在gedit中你自己的语法高亮? [英] Creating your own syntax highlighting in GEdit?
本文介绍了创建在gedit中你自己的语法高亮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你如何添加一个关键字关键字的列表的gedit?我basiclly想让printf函数看起来像一个关键字。
的printf(的Hello World \\ n);
解决方案
gedit的使用 GtkSourceView 其语法高亮。您应该能够找到 c.lang
文件,它使用由这样键入命令以突出C code:
$找到gtksourceview | grep的/c.lang
一旦你找到了郎文件,在文本编辑器打开它(它是一个XML文件),在接近底部,你会看到关键字的列表,你应该能够添加的printf
到
How do you add a 'keyword' to the GEdit list of keywords? I basiclly want to make the printf function look like a keyword.
printf("Hello World\n");
解决方案
GEdit uses GtkSourceView for its syntax highlighting. You should be able to find the c.lang
file it uses to highlight C code by typing a command like this:
$ locate gtksourceview | grep /c.lang
Once you find the lang file, open it up in a text editor (it's an XML file) and near the bottom you'll see a list of keywords which you should be able to add printf
to.
这篇关于创建在gedit中你自己的语法高亮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文