HTD / NST

New Source Tree Komodo Addon
32 stars 20 forks source link

Bypass too big files, expand definitions by default #44

Closed manhg closed 7 years ago

manhg commented 9 years ago

Big file causes Komodo hangs up.

To overcome this and treat big file as plain text, we should set limits using a Javascript macro.

// Let Komodo able to open big files by disable Syntax Highlight
var gprefs = Components.classes["@activestate.com/koPrefService;1"].
  getService(Components.interfaces.koIPrefService).prefs;
gprefs.setLongPref("documentByteCountThreshold", 200000);
gprefs.setLongPref("documentLineCountThreshold", 5000);
alert('All was set. Openning big files is OK right now');