Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 867
kaldimar Avatar asked Dec 01 '13 19:12

kaldimar


3 Answers

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

like image 150
frlan Avatar answered Oct 16 '22 05:10

frlan


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

like image 2
Mislav Blažević Avatar answered Oct 16 '22 04:10

Mislav Blažević


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.

like image 1
Lonnie Best Avatar answered Oct 16 '22 06:10

Lonnie Best