【问题标题】:Gedit syntax highlighting not workingGedit语法突出显示不起作用
【发布时间】:2016-11-26 08:47:22
【问题描述】:

几个月来,我的大部分 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'

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

附加信息:

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

我将不胜感激任何有关此问题的帮助或想法。

【问题讨论】:

    标签: linux syntax highlighting opensuse gedit


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-13
      • 1970-01-01
      • 1970-01-01
      • 2020-01-31
      • 2014-01-22
      • 1970-01-01
      • 2017-10-19
      • 1970-01-01
      相关资源
      最近更新 更多