Pages: [1]   Go Down
Author Topic: Arduino syntax file for Gedit  (Read 1305 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 166
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hy all!

I modified the c.lang file adding some new keywords in order to write arduino programs in Gedit smiley

You gotta put this file into /usr/share/gtksourceview-2.0/language-specs

It's kinda rough so, if you have any suggestions or insults (hope not  smiley-mr-green), just post a reply to this topic  smiley

Hope useful
Tobo

* arduino.lang (11.83 KB - downloaded 35 times.)
Logged

Mom: Can he lead a normal life?
Doctor: NO! he'll be an engineer!

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hy all!

I modified the c.lang file adding some new keywords in order to write arduino programs in Gedit smiley

You gotta put this file into /usr/share/gtksourceview-2.0/language-specs

It's kinda rough so, if you have any suggestions or insults (hope not  smiley-mr-green), just post a reply to this topic  smiley

Hope useful
Tobo

Somewhere I've seen one of these before - so I am not sure your contribution is "new", per se, but it still will probably be useful to someone.

I'll tell you what would be really useful, if you want to tackle it - seeing as how you have this experience under your belt (and if I had time to do this, I would myself):

1. Build a similar "language file" (or whatever is needed) for Geany
2. Build a set of plugin/scripts or whatnot for Geany to compile/send Arduino files to the Arduino via avr-gcc and avrdude just like the current IDE

I work with Geany on a daily basis at my current employer, mainly for PHP and Javascript (web app development); I've found it to be a nice IDE for software development; not too heavy like Eclipse can be, not too light like Gedit. It shouldn't take much to get the "language" highlighting in place (its designed with gcc in mind), but getting the compiler stuff in place might be a greater challenge.

Hmm - just did a search and found this; not sure if it does everything needed or not (maybe I'll have to try it in the future?):

http://arduino.cc/forum/index.php?topic=50996.0

smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Offline Offline
Full Member
***
Karma: 0
Posts: 166
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, my lang file is not new smiley-wink but that modify was only about recognizing .pde files under gedit, and it had a "cohabitation" problem with c.lang file smiley I fixed the problem and included some arduino keywords.

I have no particular experience under my belt smiley-wink I just opened various .lang file and tried to understand what to change in order to add the keywords.

Well I don't know Geany but I'll try to make what you wrote smiley starting from the lang file, which should be the simplest thing to do smiley

Stay tuned smiley-wink
Logged

Mom: Can he lead a normal life?
Doctor: NO! he'll be an engineer!

Offline Offline
Full Member
***
Karma: 0
Posts: 166
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, I made "something"  smiley-mr-green

Geany recognizes the sintax file, but not automatically, anytime I create a new .pde file I have to set the file type.
the next step is to understand how to compile projects using terminal.
Logged

Mom: Can he lead a normal life?
Doctor: NO! he'll be an engineer!

Pages: [1]   Go Up
Jump to: