Komodo edit 8 disables syntax highlighting on large files for performance reasons. Is there anywhere to tweak the threshold, or disable the disabling completely?
My prefs.xml has:
<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>
My test file is 53520 characters (CP1252) over 1040 lines of PHP, and Komodo Edit refuses to syntax highlight it.
Some time ago i've created following javascript macro. You need to add it to your toolbox
(i.e. go to toolbox, right click, New Macro... and make sure that JavaScript is marked as Language then paste the code )
Macro code:
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"
})();
}
Then execute it from toolbox as many times that you need or feel free to change multiply, for your own constants values.
Hope it will help.
Use the following settings in prefs.p.xml:
<!--
These prefs are to keep Komodo from hanging when a document
that hits at least one of these limits is loaded. Komodo will
treat the document as a Text file, meaning all language-specific
functions, including code-colorizing, are dropped.
The reason for the high first value is that long lines are
costlier than long documents. 2013-11: Increase limits to
2MB / 40K lines / 100K max line-length due to fixing bug 101267
probably too low.
Also, Komodo estimates that colorizing UDL-based documents
takes about twice as long as languages with C++-based lexers,
and adjusts the limits by 50% downward.
-->
<long id="documentByteCountThreshold">2000000</long> <!-- 2 MB -->
<long id="documentLineCountThreshold">40000</long> <!-- 40K * 40c/line => 1.6 MB -->
<long id="documentLineLengthThreshold">100000</long><!-- 100K -->
<boolean id="donotask_treat_large_documents_as_text">0</boolean>
Komodo stores preferences, macros, templates, keybinding schemes and other settings in a user-specific directory called the user data directory. The name and location of this directory varies depending on the operating system and Komodo version:
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>
Restart Komodo to test the changes.
References
KomodoEdit repo: prefs.p.xml
Komodo File Locations: Where does Komodo Keep Settings Data?
Related
Does anyone know if there's a way to set the default font size for the Access 2016 Query Zoom window?
I often use the Zoom window when editing lengthy/complex expressions. I can set the zoom window font size but it only "sticks" for the current session. Next time I start Access, it's back to Tahoma 8pt.
I have no issue with the "Query Design Font" (File → Options → Object Designers → Query Design Font) as it [properly] stays where I set it (Sergoe UI 11) between sessions, but the Zoom window seems to insist upon a smaller font than the query designer.
Maybe I'm missing something but I couldn't find anything applicable online, nor in/around registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Access
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Access
It's a minor issue but years of frustration with it is starting to add up! Surely there's a setting somewhere so I don't have to change it every time I use Access... Any ideas? Thanks!
[I'm running Access 2016 (local install Version 1711 via Office 365 ProPlus subscription) on Windows 7 Home Premium SP1 64-bit.]
The Zoom box is part of (Office installation path)\ACCWIZ\UTILITY.ACCDA. You can open this file and see the form ZoomForm, but you can't edit it.
Note that the Zoom box is not restricted (or specific) to the query designer - you can use Shift+F2 wherever you can edit (or see) a value.
With help from https://access-programmers.co.uk/forums/showthread.php?t=238660 and https://bytes.com/topic/access/answers/739912-change-default-font-zoom-box :
Set a reference to UTILITY.ACCDA.
In your startup code (called from an AutoExec macro), call this function:
Public Function ZoomBoxSetParams()
' adapt to your preferences
utility.zoom_stFontName = "Consolas"
utility.zoom_iFontSize = 16
End Function
It is not necessary to overwrite the Shift+F2 action with an AutoKeys macro as proposed in the linked threads. You only need to set these variables, and the Zoom box will always use this font.
Note:
This is mainly useful for your development computer. If any of your users use a different version of Access, or the runtime version, the reference to UTILITY.ACCDA will break.
If you are in this situation, you will either have to remove the reference and code before distribution, or perhaps set the reference at runtime if UTILITY.ACCDA is available.
Edit:
An alternative Zoom box is here: http://www.accessmvp.com/TomVanStiphout/ZoomBox.htm
(I haven't tried it)
I have strange problem connecting with PhpStorm IDE. I use version 2016.3.2 Build #PS-163.10504.2.
I love using Ctrl + Shift + N for searching files which I need to override. I have 2 project (one new, one old) and in old file searching works fine and in new search only for twig files and nothing else.
Is there any configuration I need to change?
Check filter -- the blue Funnel icon on the right top corner of that popup -- you may have selected to list files of certain types only.
Otherwise -- try universal File | Invalidate Caches... and restart IDE -- it usually helps in such "suddenly stop working" situations.
I can see my page get crash(see aw, snap page) with 20% proprobility after 10 mins(otherwise it runs well like forever)
so I tried:
1) CPU and memory check with task manager, and see no increasing(so no leakage).
2) enable crush log in the chrome://settings/
result:
2.1) see still nothing in the chrome://crashes page, not even a crush ID (0 crashes).
2.2) see nothing in the folder under path
C:/%User%/AppData/Local/Google/CrashReports (nothing in) nor
C:/%User%/AppData/Local/Google/Chrome/User Data/Crash Reports (folder not exist)
2.3) but indeed see DMP in the:
C:/%User%/AppData/Local/Google/Chrome/User Data/CrashPads/reports
but seems they are not readable, and it also seems not the correct address for crash logs
3) can get chrome log either by command line arguments, or using sawbuck, but found nothing but only 2 errors, one for sawbuck itself, and another saying can't send the report to google.
So the questions are:
1) are those DMP the crash logs(the default Dir for dump file has been changed for chrome v50)
2) how can I abstract information out of the DMP file, if chrome://crashes page shows nothing (for chrome on windows)
p.s. 2 usage pages are found at https://www.chromium.org/developers/decoding-crash-dumps
https://www.chromium.org/developers/crash-reports
but seems it's not for windows without a recompile of chrome's component, is there any 3rd party tools to interpret the DMP file?
env informations:
chrome version: 50.0.2661.02 m
; Host OS: windows 10
The crash dumps (.dmp files) in C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Crashpad\reports can be read by standard Windows debuggers. WinDbg is one tool (provided by Microsoft) for analysing these dumps; it's not going to win any beauty contents, but it's powerful and gets the job done. The recommended way to obtain it is, somewhat bizarrely, the Windows Driver Kit.
You'll need debugging symbols to make sense of the results, and these aren't included in standard builds of Chrome. To get symbols for both Chrome and the Windows runtime, set the following as your Symbols path:
SRV*c:\symbols*https://msdl.microsoft.com/download/symbols;SRV*c:\symbols*https://chromium-browser-symsrv.commondatastorage.googleapis.com
There are numerous resources on using WinDbg on the web; this cheat sheet contains some useful commands to get you started.
I've been trying to run google's sample IME, without success. The problem is, it's not even executing. As you can see in the code below, console.log should give me at least one line of feedback, and is not:
var context_id = -1;
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var ime_api = chrome.input.ime;
var context_id = -1;
console.log("Initializing IME"); //THIS LINE I EXPECT TO SEE, NO MATTER WHAT
These are the files I'm using, if you wanna read them:
http://developer.chrome.com/extensions/examples/api/input.ime/basic/main.js
http://developer.chrome.com/extensions/examples/api/input.ime/basic/manifest.json
Any thoughts?
What's your OS? If you're on Chrome OS, there are 3 steps to enabling an IME:
load unpacked extension
logout/login
ctrl+shift to switch input methods
I imagine for other operating systems, there is some similar "restart chrome" type of sequence required.
First you need to be running chrome os.
Second, make sure you set your language to english (united states) and select the input method "Test IME". After that restart your chromebook (or whatever computer).
Where does GM_setValue store the data to in chrome. I've tried to determine where the data is going but couldn't figure it out. I monitored with process monitor and saw that when I stored a value chrome was updating a chrome_iwoeoiifoi2h3iofhufsdfnvdf type of file and I opened that up with an sqlite browser but the data was not there. I've looked at all the recently modified files trying to find the data but could not find it.
Latest chrome/TM.
In Tampermonkey, GM_setValue() data is stored in a LevelDB database that can be found in the User Data Directory tree.
Once in Chrome's "User Data Directory" (EG: C:\Users\USER_JOE\AppData\Local\Google\Chrome\User Data\Default\),
navigate to the Local Extension Settings\dhdgffkkebhmkfjojejmpbldmpobfkfo folder.
(gcalenpjmijncebpfijmoaglllgpjagf for the Tampermonkey Beta.)
There you will find a LevelDB database, usually named CURRENT. You can manipulate it with tools like LevelDB JSON, but external support for LevelDB currently appears to be spotty and I did not find any working tools for Windows yet (might have to compile your own).
You can also use the Chrome Storage Area Explorer extension to explore the data.
As of Tampermonkey 4.3.6, you can see an individual script's data with the Storage tab in the built-in script editor: (if the 'Storage' tab is not visible, edit Tampermonkey Settings > General Config mode > Advanced)
OLD, Pre November-ish 2015:
Before, about November 2015, data was stored in a Web SQL database in databases\chrome-extension_dhdgffkkebhmkfjojejmpbldmpobfkfo_0.
Once you have navigated to the correct folder, you will typically see two files. On my machine, they are currently just named 4 and 6. These are both SQLite files (the backend for Chrome's Web SQL implementation) and can be inspected with a SQLite viewer/utility.
The (normally) larger file, 6 on my machine, is a somewhat disturbing list of 94-thousand userscripts! I'm not sure what purpose it serves, but haven't investigated it much.
The smaller file (initially, at least), 4 on my machine, is where all the information about/for your userscripts is kept. This includes any data set by GM_setValue().
For example, if I install and run this userscript:
// ==UserScript==
// #name _GM_setValue demo
// #match https://stackoverflow.com/questions/*
// #grant GM_setValue
// ==/UserScript==
GM_setValue ('foo', 'bar');
And then I inspect the `config` table in file `4`, I will see four entries like this:
[![DB entries for sample script][8]][8]
The one you want is the `#st` row. Notice how it has the `GM_setValue` data encoded? :