linux - Gedit 语法突出显示不起作用

标签 linux syntax highlighting opensuse gedit

几个月来,我一直在使用 gedit 进行大部分 C++ 和 php 编辑,语法高亮显示效果很好。就在最近,我去查看我的一个 .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'

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

附加信息:

  • 我没有root权限
  • 我的机器运行的是 openSUSE 11.3
  • gedit 版本:2.28.3
  • pcretest 命令返回:PCRE 版本 7.6 2008-01-28
  • 我已经多次重启,希望这会自行修复,但没有成功

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

最佳答案

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

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

关于linux - Gedit 语法突出显示不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38526595/

相关文章:

php - 重定向输出时无法终止子进程

python - 从 Python 2.6.5 为 Debian 5 构建 Deb 包,失败

javascript - 为什么 myvar = $(this) 之后 myvar 未定义

html - 突出显示具有 html 实体的字符串的一部分作为文本 : angularJs

android - 在没有 onClickListener 的情况下在日历 View 中突出显示特定日期

linux - 从 shellcode 启动的 Shell 在启动时立即停止

java - 无法在 AWS 实例 (Linux) 上编译 GWT 应用程序

c - 数组和 C 语法

scala - 链接调用时省略点

用于语法高亮 syslog 文本日志的 Javascript 库?