gedit syntax highlighting for assembler files (*.asm)

元气小坏坏 提交于 2020-12-28 07:48:43

问题


By default, gedit doesn't syntax highlight .asm files.

How can I add this support for this language?


回答1:


The following steps should be enough.

wget http://www.carminebenedetto.net/_downloads/asm-intel.lang
sudo cp asm-intel.lang /usr/share/gtksourceview-3.0/language-specs/

Note that the exact folder to copy the .lang file to depends upon your version. You may have gtksourceview-2.0 instead, or even something else. On my machine I had both 2.0 and 3.0, and copied the file into each one's language-specs subfolder.




回答2:


Apparently the language definition provided on the extra language definitions page is not working with gtksourceview-4.0
I changed the file a bit and it works for me. The updated version can be found here.
Also here is a version for the 8086 (I have limited knowledge when it comes to XML and gtksourceview, feedback is welcomed)



来源:https://stackoverflow.com/questions/17003401/gedit-syntax-highlighting-for-assembler-files-asm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!