You are here: PSPad forum > English discussion forum > Add new file types to existing Highlighter

Add new file types to existing Highlighter

#1 Add new file types to existing Highlighter

Posted by: florianmuellerCH | Date: 2014-01-02 11:39 | IP: IP Logged

Hi PSPad Community

I am working right now with a small scripting language that has quite much parallels to PHP, and this is why the PHP syntax highlighter fits quite well.

Now I want to achieve that the PHP syntax highlighter is automatically chosen when such a file gets opened. I tried adding the new file extension at "Settings > Highlighter settings > PHP > Specification", but this actually takes only effect in the save dialog (available extensions), but the syntax highlighter won't automatically work.

EDIT: It works correctly if I create a new file (Ctrl + N) and then click on PHP.

What do I else have to do?

Thank you in advance for your help! smiling smiley

Edited 1 time(s). Last edit at 2014-01-02 11:42 by florianmuellerCH.

Options: Reply | Quote | Up ^


#2 Re: Add new file types to existing Highlighter

Posted by: vbr | Date: 2014-01-02 12:01 | IP: IP Logged

florianmuellerCH:
Hi PSPad Community

I am working right now with a small scripting language that has quite much parallels to PHP, and this is why the PHP syntax highlighter fits quite well.

Now I want to achieve that the PHP syntax highlighter is automatically chosen when such a file gets opened. I tried adding the new file extension at "Settings > Highlighter settings > PHP > Specification", but this actually takes only effect in the save dialog (available extensions), but the syntax highlighter won't automatically work.

EDIT: It works correctly if I create a new file (Ctrl + N) and then click on PHP.

What do I else have to do?

Thank you in advance for your help! smiling smiley

Hi,
I believe, it should work with the settings you made, e.g. adding an item in File Mask
in Settings > Highlighter settings > PHP > Specification

like
*.someextension
(and possibly newline at the end of the list)

Another possible issue might be the file size limit for automatic highlighting on opening
If your files are bigger, you can increase this limit in
Settings: Program settings: [Direct edit]: Special settings:
HLOnUpToSize=...

hth,
vbr

Options: Reply | Quote | Up ^


#3 Re: Add new file types to existing Highlighter

Posted by: florianmuellerCH | Date: 2014-01-10 14:33 | IP: IP Logged

I'll give that with the newline a try this evening.

But the files I'm trying to open aren't that big.

Could it possibly be that the extension is somehow already entered at another highlighter? I'm trying to add the extension *.sqf to the PHP highlighter...

Thank you for your help!
Florian

Options: Reply | Quote | Up ^


#4 Re: Add new file types to existing Highlighter

Posted by: pspad | Date: 2014-01-10 18:33 | IP: IP Logged

Send some screenshot. When you save highlighter settings and go there again, if your new extension there?

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR