Locate php.lang file and edit it
locate gtksourceview | grep /php.lang
Now i did
sudo gedit /usr/share/gtksourceview-2.0/language-specs/php.lang as location of my php.lang file was
In php.lang file look for
<property name="globs">*.php;*.php3;*.php4;*.phtml</property> or similar and add more file extenstions separate with semicolon (;). I added *.ctp, *.tpl, *.module to make it look like
<property name="globs">*.php;*.php3;*.php4;*.phtml;*.ctp;*.tpl;*.module;</property>. Save the file and restart gedit. Files with newly added extension should load syntax highlighting automatically.
Hello Friends, I’m Arvind Kumar, founder of Inimist Technologies, Inimist Academy, The Fundabook and many more. I am a Full Stack Web Developer and Programmer by heart, and a Hindi/English blogger by chance. I build Web and Mobile Application around React, VueJS, NodeJS and PHP frameworks.
Have a project in mind? Get in touch