Re: [gedit-list] Adding a new file extension to gEdit



On 10/19/2010 08:15 PM, Brett Alton wrote:
> At work, I'm forced to use Windows but am still loyal to my favourite
> text editor gEdit.
>
> They use a file extension called .ct for certain .php files, but when
> gEdit opens them up, the are registered as text files instead of php
> files. This is fine as I understand mime types and that gEdit will
> search through the first 50 lines (or was it characters?) to see if a
> <?php tag appears.
>
> I've searched how to do this but found answers only for Ubuntu:
>
> http://www.jbcrawford.net/archives/10
> http://ubuntuforums.org/showthread.php?t=463344
>
> How do I add .ct so that gEdit opens it as a .php file in Windows??
>
>   
The easiest 'hack' is to modify the php language file and add a glob
*.ct. The language file should be somewhere in language-specs/php.lang.


Jesse



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]