[Linux] Add AVR Assembly (*.s) Syntax Highlighting to Geany

  • 0
One of my favorite Linux Text Editor is Geany. However, if you want to write avr assembler programs with Geany, you may notice that it does not support syntax highlighting for *.s assembly-files. This will show you how you can easily create your custom filetype configuration for your assembly source files in order to get full syntax highlighting support for avr assembly programs.

First copy the standard file for filetype configuration filetype_extensions.conf to your local geany config directory:
 cp /usr/share/geany/filetype_extensions.conf ~/.config/geany
To recognize the new filetype extension, add the following line to your local filetype_extensions.conf.
Avr=*.s;
Now,Arthur Artamonov contributed an improved filetypes.asm which conaints the AVR instuctions. The file is listed below:


Source: http://wiki.geany.org/config/avr_asm

Notice: You have to change the file extension format:
Just change the line:
extenstion=asm
to
extenstion=s
Right after this line you have to specify a lexer for your file format. You can use the one from ASM. so right after the above line add the following:
lexer_filetype=ASM
Save this file with filename: filetypes.Avr.conf  in ~/.config/geany/filedefs

And you are done!


(Re)Start Geany and try opening a *.s assembly source file. The content of the file should be nicely displayed with syntax highlighting.

Notice: You can do a lot moar with custom filetypes. For this, take a look at the Geany Manual.

:)

No comments:

Post a Comment