Blog of Raivo Laanemets

Stories about web development, consulting and personal computers.

Highlight .pl as Prolog in Kate

On 2013-11-25

The default file name extension for Prolog has always been .pl which causes some confusion with Perl that happens to use the same file name extension. Kate the KDE's Advanced Text Editor also thinks that these are Perl files and tries to highlight them accordingly. An easy way to fix it is to edit settings in:

Configure Kate -> Editor Component -> Open/Save -> Modes & Filetypes -> Sources/Prolog

Add *.pl into File Extensions (separated by ;). Then select filetype Script/Perl in the same view and remove *.pl from there.

This serves as a quick workaround. Seems like a proper fix would be through mimetypes.