SOLVED? RJTE unable to highlight / fold shtml files?

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

SOLVED? RJTE unable to highlight / fold shtml files?

Post by inspector71 »

Hello

Is it possible RJTE chokes on any file with .shtml as the extension .. even after I manually set the highlighting to HTML?

I have a simple index.shtml file with just one SSI directive towards the bottom of the file.

RJTE does not give the file an icon as if it recognises the file:

Image

and syntax highlighting just will not apply even after I pick HTML several times. Oddly enough, syntaxes for other languages do apply successfully (in so far as they can).

Presently I'm loading the file via ... you guessed it, SFTP. I am not sure if that's am issue though as another file, same site, same SFTP method, named index.html but in another folder, gets syntax highlighting and folding no problems!

I scoured the Syntax Highlighter and Options for a place to force RJTA to automatically apply HTML syntax to .shtml files but there does not appear to be such a facility in RJTE which surprises me a lot. The closest is associated a file type with Windows but I am not sure that's going to do anything so I have not done this ... knowing how hard / fiddly it can be to remove such associations.

The file is also UTF8 w/out BOM and I converted it to LF from CRLF so it's the same in that respect than a lot of .html files from the same source, via the same SFTP open method, that all work fine with RJTE in terms of syntax highlighting and code folding.

Here is the local copy of the file.
index.zip
(8.09 KiB) Downloaded 64 times
I would try the Convert file encodings tool but this is unfortunately yet another corner of RJTE that's not available to SFTP users. I guess I'll try a local copy and see if that solves the problem.

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: RJTE unable to highlight / fold shtml files?

Post by pjj »

inspector71 wrote:
12 May 2020 05:41
I scoured the Syntax Highlighter and Options for a place to force RJTA to automatically apply HTML syntax to .shtml files but there does not appear to be such a facility in RJTE which surprises me a lot.
Environment > Add-ons > Highlighters (not that it's obvious, as it isn't ;)
After adding .shtml extension there highlighting is being applied to your file, but it's strange indeed that manually changing highlighter to HTML doesn't have any effect (while changing to other highlighter does).
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: RJTE unable to highlight / fold shtml files?

Post by inspector71 »

pjj wrote:
12 May 2020 08:33
inspector71 wrote:
12 May 2020 05:41
I scoured the Syntax Highlighter and Options for a place to force RJTA to automatically apply HTML syntax to .shtml files but there does not appear to be such a facility in RJTE which surprises me a lot.
Environment > Add-ons > Highlighters (not that it's obvious, as it isn't ;)
After adding .shtml extension there highlighting is being applied to your file, but it's strange indeed that manually changing highlighter to HTML doesn't have any effect (while changing to other highlighter does).
Hi pjj!

Thanks for your input.

I did get to that page. I suspect it might be different for me. Maybe even a theme issue accidently obscuring the something on the page?

Image

Hmm, no, doesn't seem to be a theme thing:

Image

Is that page the same as yours? Sure looks like a lot of scroll whitespace for nothing there!

AFAIK most editors I've ever used have had the ability to add file extensions to a list that are considered equivalent to certain syntaxes. May be an extreme example but, for example, if someone wanted to use the HTML syntax for all .js files, they could. Or .cgi and .pl would both use the Perl syntax, for example.

I agree the menus and options could perhaps use a bit of an overhaul.

User avatar
Rickard Johansson
Site Admin
Posts: 5988
Joined: 19 Jul 2006 14:29

Re: RJTE unable to highlight / fold shtml files?

Post by Rickard Johansson »

I've fixed the manual highlighter selection issue in v14.51.

To assign .shtml to a highlighter you need to do it in "Environment > Add-ons > Highlighters". Not in options.

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: SOLVED? RJTE unable to highlight / fold shtml files?

Post by inspector71 »

Ohhhh!

I'm so silly sometimes!

That's exactly what @pjj said. I just read it incorrectly!

Thanks Rickard.

Also, glad to see I helped identify another bug (and it was not just my sillyness!).

Very good :)

Even better, nabbed myself some new syntax updates thanks to the sweet in-app updater, whilst I was there setting .shtml

Thanks for the support guys, you're the best!

Post Reply