You are here: PSPad forum > Bug report / Hlášení chyb > Re: Multi-HTML highlighter fallback on MultiHLUpToSize trigger
Posted by: gwinkless | Date: 2014-09-11 09:39 | IP: IP Logged
Hi
I work on an old codebase that has some PHP include files saved as .inc. As such, I've added .inc to the PHP highlighter file masks, which works fine.
I also have PHP configured in the HTML multihighlighter because quite a lot of the time the PHP and HTML are interspersed.
One of the .inc files is very large - over 300kB. It doesn't open in the multihighlighter because the MultiHLUpToSize setting is 200kB by default; however rather than opening in the PHP highlighter it opens as HTML.
Obviously I can change the MultiHLUpToSize setting which resolves my problem, but it seems odd that the fallback behaviour when MultiHLUpToSize is too small is to open HTML rather than to fall back to the defined highlighter for the file extension.
Thanks!
Geoff
Posted by: pspad | Date: 2014-09-11 11:16 | IP: IP Logged
Do you have active "remember file state" option in program settings / Files and dirs?
If you will change highlighter to PHP, PSPad should remember highlighter for this file too and next time open file in PHP highlighter instead of MultiHTML.
Simple use menu View / Change syntax or same functionality with toolbar button or click on the name of syntax on the PSpad statusbar.
Posted by: gwinkless | Date: 2014-10-07 11:40 | IP: IP Logged
pspad:If you will change highlighter to PHP, PSPad should remember highlighter for this file too and next time open file in PHP highlighter instead of MultiHTML
As I said, I have a workaround anyway (change the MultiHLUpToSize value) but I don't understand why it wouldn't fall back to the default language for the filetype (rather than opening as HTML) when the file size is over MultiHLUpToSize.
Posted by: pspad | Date: 2014-10-07 12:09 | IP: IP Logged
I will do it. But I have to go step by step and make changes requests as they come
Posted by: gwinkless | Date: 2014-10-07 15:21 | IP: IP Logged
pspad:I have to go step by step and make changes requests as they come
That's fine, of course - it's certainly not urgent (especially since it no longer affects me!) I just wanted to make sure you understood what I meant.
Editor PSPad - freeware editor, © 2001 - 2025 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR