Gedit Spin Syntax Highlighting -> Solution!
SRLM
Posts: 5,045
I develop for the Propeller on Ubuntu Linux, and I prefer to use Gedit for my editor. I have written a syntax highlighter file for Spin/PASM, and it's available at the bottom of this post.
Installation Instructions:
1. Download the spin.lang file, and put it here: /usr/share/gtksourceview-3.0/language-specs/ folder
2. Restart Gedit
3. Done!
It doesn't work! What should I do?
--- Look for option "Spin" under View->Highlight Mode->Sources->Spin
--- Try putting it in /usr/share/gtksourceview-2.0/language-specs/ folder
--- Not using a recent edition of Ubuntu? Try doing a google search for your OS on where to install .lang files.
Known Issues:
1. When you create a new Spin file in the editor, it doesn't do highlighting by default (reload file or see first debug option above)
2. It doesn't highlight correctly numbers with an underscore
3. Some PASM keywords appear hightlighted in Spin sections, and vice versa
4. You prefer emacs. No solution, but a workaround can be found here.
Note that these issues don't affect the actual code, just how it's displayed to you.
As a related note, you can compile the code with BSTC, available here. Here is the BSTC command that I use to compile code:
Once on the Propeller, I use picocom or cutecom to get the serial data from the USB connection.
Edit: and once again, I get bit by the forum software. The spin.lang file is in the .zip file.
Installation Instructions:
1. Download the spin.lang file, and put it here: /usr/share/gtksourceview-3.0/language-specs/ folder
2. Restart Gedit
3. Done!
It doesn't work! What should I do?
--- Look for option "Spin" under View->Highlight Mode->Sources->Spin
--- Try putting it in /usr/share/gtksourceview-2.0/language-specs/ folder
--- Not using a recent edition of Ubuntu? Try doing a google search for your OS on where to install .lang files.
Known Issues:
1. When you create a new Spin file in the editor, it doesn't do highlighting by default (reload file or see first debug option above)
2. It doesn't highlight correctly numbers with an underscore
3. Some PASM keywords appear hightlighted in Spin sections, and vice versa
4. You prefer emacs. No solution, but a workaround can be found here.
Note that these issues don't affect the actual code, just how it's displayed to you.
As a related note, you can compile the code with BSTC, available here. Here is the BSTC command that I use to compile code:
./bstc.linux -f -p0 -l -w1 -L test -L lib -L lib/bma filename.spinThis will compile with three folders for library files, generate a listfile (memory/code breakdown of compiled program), give errors and warnings, and download at double data rate to the propeller into RAM and run.
Once on the Propeller, I use picocom or cutecom to get the serial data from the USB connection.
Edit: and once again, I get bit by the forum software. The spin.lang file is in the .zip file.
Comments