Adding New FIle Extension to An Existing Syntax Highlighting in Geany
Adding New FIle Extension to An Existing Syntax Highlighting in Geany? That was my question before. I used to use Notepad++ while on Windows as my fav Text Editor. But, in Ubuntu, I am using Geany. It's been long time but, I still couldn't add new file extension to using existing syntax highlighter in Geany. I thought : this is suck enough to get my script highlighted by (manually) clicking Document > Set Filetype > Scripting Language > PHP Source File. Eeeevery time I open 'undefined' extensions >.<While in Notepad++, I just have to Preferences. Not in Geany. I have gone to Preferencces menu and swept the menu. But nothing. Googling is just confusing. Might be because Geany users are not 'active'. The help menu is just the same confusing -___-"
OK then. I got the way anyway :D Here it is :
- You just need to click the Tools menu > Configuration file > choose filetypeextentions.conf
- Find highlighting name and add your extension.
- For example : I need to add *.ctp and *.thtml extensions to use PHP highlight.
So, I go to line named PHP. And add the extensions separated by semicolon (;). The result is
PHP=*.php;*.php3;*.php4;*.php5;*.phtml;*.ctp;*.thtml; - Save, and you've done :D
10 comments
Write commentsExactly what I needed! Thanks
ReplyThank you so much! CakePHP on Geany here I go!
ReplyGreat, thank you.
ReplyGlad it helps :D
ReplyConsider to use Sublime Text. It rocks!
ReplyYou're welcome :)
ReplyAnother user satisfied. Thanks for the tip!
ReplyOk, but how can I add a new syntax highlight to geany... for example - some kind of XML-mod syntax.
Replythanks mate you saved my time
ReplyThank you so much.
ReplyVery helpful contents.