[R-sig-Debian] gedit with .r and .R

Matthieu Stigler matthieu.stigler at gmail.com
Mon May 17 16:04:07 CEST 2010


Great! Thanks a lot!

Matthieu


Petar Milin a écrit :
> This is from several helps and how-tos:
>
> First, make same safe-guarding:
> > sudo cp /usr/share/mime/packages/freedesktop.org.xml 
> /usr/share/mime/packages/freedesktop.org.xml_backup
>
> Then, open freedeskop.org.xml to edit mime:
> > sudo gedit /usr/share/mime/packages/freedesktop.org.xml
>
> Now, you should find the end of one mime-specification and the 
> beginning of next. I did mine just after Python Python 
> mime-specification. Last two lines are:
> <glob pattern="*.py"/>
> </mime-type>
> And the next mime-type begins with:
> <mime-type type=SOMETHING BLAH>
>
> So, between the </mime-type> and <mime-type type=SOMETHING BLAH> 
> insert this:
> <mime-type type="text/x-R">
> <sub-class-of type="text/plain"/>
> <comment>R code</comment>
> <comment xml:lang="az">R kodu</comment>
> <comment xml:lang="bg">Код на R</comment>
> <comment xml:lang="cs">Kód R</comment>
> <comment xml:lang="cy">Côd R</comment>
> <comment xml:lang="de">R-Befehle</comment>
> <comment xml:lang="el">κώδικας R</comment>
> <comment xml:lang="eo">R-kodo</comment>
> <comment xml:lang="es">Código R</comment>
> <comment xml:lang="eu">R kodea</comment>
> <comment xml:lang="fi">R-koodi</comment>
> <comment xml:lang="fr">code R</comment>
> <comment xml:lang="hu">R-kód</comment>
> <comment xml:lang="it">Codice R</comment>
> <comment xml:lang="ja">R コード</comment>
> <comment xml:lang="ko">R 코드</comment>
> <comment xml:lang="ms">Kod R</comment>
> <comment xml:lang="nb">R-kildekode</comment>
> <comment xml:lang="nl">R-code</comment>
> <comment xml:lang="nn">R-kode</comment>
> <comment xml:lang="no">R-kildekode</comment>
> <comment xml:lang="pl">Kod R</comment>
> <comment xml:lang="pt">código R</comment>
> <comment xml:lang="pt_BR">Código R</comment>
> <comment xml:lang="sq">Kod R</comment>
> <comment xml:lang="sr">R ко̂д</comment>
> <comment xml:lang="sv">R-kod</comment>
> <comment xml:lang="uk">Код R</comment>
> <comment xml:lang="zh_CN">R 代码</comment>
> <glob pattern="*.R"/>
> <glob pattern="*.r"/>
> </mime-type>
>
> Finally, update mime:
> > sudo update-mime-database /usr/share/mime/
>
> That's it!
>
> Best,
> PM
>
>
> Matthieu Stigler wrote:
>>
>>> I would like to recomment Gnome's editor: GEdit. It has some really 
>>> nice Plugins, for LaTeX, Python etc. It also has Rgedit among other 
>>> goodies. Go and check: http://live.gnome.org/Gedit/Plugins
>>>
>>> Good luck! And: Hello to Debian! :-)
>>>
>>> PM
>> Btw, did anyone succeed in having gedit recognize .R files?
>>
>> For me (Ubuntu 9.10), it does only with .r files, using then the 
>> appropriate code coloration mode, but not with .R files... Do yo 
>> uhave the same problem? And found a solution?
>>
>> Thanks!
>>
>> Matthieu
>>
>
> -- 
> #####################################################################################
> Petar Milin
> Department of Psychology, University of Novi Sad, Serbia
>  &
> Laboratory for Experimental Psychology, University of Belgrade, Serbia
>
> Address:   Dr Zorana Dindica 2, Novi Sad 21000, Serbia
> E-mail:    pmilin <AT> ff.uns.ac.rs
> Tel.&Fax:  +381 21 458 948
>
> Official homepage (in Serbian):
> http://www.ff.uns.ac.rs/fakultet/ljudi/fakultet_odseci_psihologija_petar_milin.html
>
> Personal homepage:
> http://sites.google.com/site/pmilin/
> #####################################################################################
>
>
>



More information about the R-SIG-Debian mailing list