Configuration 如何在“上启用语法突出显示”;“大的”;Komodo中的文件编辑?

Configuration 如何在“上启用语法突出显示”;“大的”;Komodo中的文件编辑?,configuration,syntax-highlighting,komodo,komodoedit,Configuration,Syntax Highlighting,Komodo,Komodoedit,由于性能原因,Komodo edit 8在大文件上禁用语法高亮显示。是否有任何地方可以调整阈值,或完全禁用禁用 My prefs.xml具有: <long id="documentByteCountThreshold">1000000</long> <long id="documentLineCountThreshold">20000</long> <long id="documentLineLengthThreshold">32000

由于性能原因,Komodo edit 8在大文件上禁用语法高亮显示。是否有任何地方可以调整阈值,或完全禁用禁用

My prefs.xml具有:

<long id="documentByteCountThreshold">1000000</long>
<long id="documentLineCountThreshold">20000</long>
<long id="documentLineLengthThreshold">32000</long>
<boolean id="donotask_treat_large_documents_as_text">0</boolean>
1000000
20000
32000
0

我的测试文件是53520个字符(CP1252),超过1040行PHP,Komodo Edit拒绝语法突出显示它。

在中使用以下设置:


2000000
40000
100000
0
Komodo将首选项、宏、模板、密钥绑定方案和其他设置存储在称为用户数据目录的用户特定目录中。此目录的名称和位置因操作系统和Komodo版本而异:

Windows Vista、Windows 7、Windows 8或更高版本
C:\Users\\AppData\Local\ActiveState\Komodo[IDE | Edit]\
Windows XP或更早版本
C:\Documents and Settings\\Local Settings\Application Data\ActiveState\Komodo[IDE | Edit]\
Linux
/home/.komodo[ide |编辑]/
MacOSX
/用户//库/应用程序支持/Komodo[IDE |编辑]/
重新启动Komodo以测试更改

参考资料


不久前,我创建了以下javascript宏。您需要将其添加到您的工具箱中

(即,进入工具箱,右键单击,新建宏…并确保JavaScript标记为语言,然后粘贴代码)

宏代码

var gprefs = Components.classes["@activestate.com/koPrefService;1"].
          getService(Components.interfaces.koIPrefService).prefs;

var bUserIsSure = confirm(
    'Current max file size: '+(Math.floor(gprefs.getLongPref("documentByteCountThreshold")/1024/1024*100)/100)+'mb and '+gprefs.getLongPref("documentLineCountThreshold")+' lines. Do you want to increase it 10 times?'
);

if( bUserIsSure ){
    (function(){

        var gprefs = Components.classes["@activestate.com/koPrefService;1"].
          getService(Components.interfaces.koIPrefService).prefs;
        gprefs.setLongPref("documentByteCountThreshold", 10 * gprefs.getLongPref("documentByteCountThreshold"));
        gprefs.setLongPref("documentLineCountThreshold", 10 * gprefs.getLongPref("documentLineCountThreshold"));
        // No reason to change "documentLineLengthThreshold"
    })();
}
然后根据需要从工具箱中执行多次,或者可以随意更改乘法,以获得您自己的常量值


希望这会有所帮助。

似乎对meYep没有任何影响(即使从那时起重新启动),但它似乎没有禁用禁用:(添加了问题设置,以及我的测试文件中的指标尝试了两者,因为命名不清楚它是禁用的标志,还是启用该功能。。。
Windows Vista, Windows 7, Windows 8 or newer
C:\Users\<user>\AppData\Local\ActiveState\Komodo[IDE|Edit]\<version>

Windows XP or older
C:\Documents and Settings\<username>\Local Settings\Application Data\ActiveState\Komodo[IDE|Edit]\<version>

Linux
/home/<user>/.komodo[ide|edit]/<version>

Mac OS X
/Users/<user>/Library/Application Support/Komodo[IDE|Edit]/<version>
var gprefs = Components.classes["@activestate.com/koPrefService;1"].
          getService(Components.interfaces.koIPrefService).prefs;

var bUserIsSure = confirm(
    'Current max file size: '+(Math.floor(gprefs.getLongPref("documentByteCountThreshold")/1024/1024*100)/100)+'mb and '+gprefs.getLongPref("documentLineCountThreshold")+' lines. Do you want to increase it 10 times?'
);

if( bUserIsSure ){
    (function(){

        var gprefs = Components.classes["@activestate.com/koPrefService;1"].
          getService(Components.interfaces.koIPrefService).prefs;
        gprefs.setLongPref("documentByteCountThreshold", 10 * gprefs.getLongPref("documentByteCountThreshold"));
        gprefs.setLongPref("documentLineCountThreshold", 10 * gprefs.getLongPref("documentLineCountThreshold"));
        // No reason to change "documentLineLengthThreshold"
    })();
}