Arduino syntax file for Gedit

Hy all!

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

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 :grin:), just post a reply to this topic :slight_smile:

Hope useful
Tobo

arduino.lang (11.8 KB)

Tobo:
Hy all!

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

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 :grin:), just post a reply to this topic :slight_smile:

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?):

:slight_smile:

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

I have no particular experience under my belt :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 :slight_smile: starting from the lang file, which should be the simplest thing to do :slight_smile:

Stay tuned :wink:

Ok, I made "something" :grin:

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.