kaldimar
kaldimar

Reputation: 345

Make Geany recognize additional file extensions

My default Geany installation on Debian does not recognize some file types out of the box. How can I add extensions, using the same syntax highlighting as other known extensions for simplicity's sake?

In the current case, I'd like Geany to open all .aspx files with the same highlighting as .html files.

Upvotes: 19

Views: 9640

Answers (3)

Lonnie Best
Lonnie Best

Reputation: 11399

I had trouble accomplishing this without help from here.

Go here to read documentation about this topic.

From the Geany menu, go to:

Tools > Configuration Files > filetype_extensions.conf

Go to this line and un-comment it:

#~ [Extensions]

So that it just reads:

[Extensions]

I was needing to add .mjs as an additional extension for javascript. So, for me, I also uncommented this line:

#~  Javascript=*.js;

And changed it to:

Javascript=*.js;*.mjs;

After this, I saved the file.

Now when I opened files having a .mjs file extension, they automatically have Javascript Syntax Highlighting.

I made some suggestions to improve this expeirience here.

Upvotes: 5

frlan
frlan

Reputation: 7260

Use inside the menu Tools->Configuration files->filetype_extensions.conf. This will allow you to configure the filetypes based on suffix for your user.

Upvotes: 27

Mislav Blažević
Mislav Blažević

Reputation: 268

Just add new extensions in /usr/local/share/geany/filetype_extensions.conf

Upvotes: 1

Related Questions