Gedit 语法突出显示不起作用

Gedit syntax highlighting not working

我的大部分 C++ 和 php 编辑都使用 gedit 几个月,语法突出显示工作正常。就在最近,我去查看我的一个 .cpp 文件,语法突出显示失败了。我尝试了多个其他文件,现在所有文件的语法突出显示都失败了。我在 gedit 运行时收到以下错误:

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_match_full: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_replace_eval: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: g_regex_unref: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_match_full: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_replace_eval: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: g_regex_unref: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_match_full: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: PCRE library is compiled without UTF8 support

(gedit:9833): GLib-CRITICAL **: g_regex_replace_eval: assertion `regex != NULL' failed

(gedit:9833): GLib-CRITICAL **: g_regex_unref: assertion `regex != NULL' failed

(gedit:9833): GtkSourceView-WARNING **: in file /usr/share/gtksourceview-2.0/language-specs/cpp.lang: style 'c:keyword' not defined

(gedit:9833): GtkSourceView-WARNING **: Failed to load '/usr/share/gtksourceview-2.0/language-specs/cpp.lang': style override used with wildcard context reference in language 'cpp' in ref 'def:line-continue'

这是一个最近才开始发生的非常令人沮丧的问题,我不确定为什么。

附加信息:

我将不胜感激任何关于这个问题的帮助或想法。

经过一番折腾,终于解决了我的问题。我正在处理涉及编辑我的 LD_LIBRARY_PATH 环境变量的程序,所以我在我的 .cshrc 中添加了几行以添加追加一些共享库。我确保将我新添加的库附加到变量,但无论出于何种原因,这仍然搞砸了 Gedit 进行语法高亮显示的能力。从我的 .cshrc 脚本中取出 setenv 命令后,我重新启动,Gedit 的语法突出显示恢复正常。

我听说使用 LD_LIBRARY_PATH 被认为是不好的做法。现在我对可能出错的地方有了第一手经验。