Sublime Forum

File with .hdr ending

#1

Hi everyone

I often work with text files with a filename extension of “.hdr”, which stands for “header”. The files contain metadata with instructions for reading an accompanying binary file.

Up until build 4152, Sublime Text correctly opened such “.hdr” files as text files. Since build 4166, however, Sublime Text tries to open “.hdr” as an image file, which obviously does not work. I’m not sure if this is also related to macOS classifying “.hdr” as “Radiance” files.

Is there a way to configure Sublime Text in such a way, that “.hdr” files are opened as text files again?

Thanks!

0 Likes

#2

Seems to be something, which needs to be fixed by sublimehq.

Neither assigning hdr extension to Plain Text via syntax file nor syntax-specific "extensions": ["hdr"] resolves works.

While other image formats such as *.jpeg are also listed in binary_file_patterns, *.hdr isn’t.

Maybe worth an issue at: https://github.com/sublimehq/sublime_text/issues

0 Likes

ST (latest) opens my .hdr files as image
#3

FTR: https://github.com/sublimehq/sublime_text/issues/6228#issuecomment-1953506801

0 Likes