Assembly syntax highlighting with Gedit

  • 24
For those who need it, here it is a simple solution to obtain Assembly highlighting code in Gedit (that basic is not supported).
Download this file (asm-intel.lang) on your machine and copy it in the directory:
/usr/share/gtksourceview*.0/language-specs/
That's it!

24 comments:

  1. Thank you so much

    ReplyDelete
  2. You can also put this into ~/.local/share/gtksourceview*.0/language-specs/ if you don't like modifying the system

    ReplyDelete
  3. Thanks!!
    I'm starting to learn assembly and it's very helpful!! :)
    (Sorry for my English)

    ReplyDelete
  4. do I need to restart my computer to enable it?

    ReplyDelete
  5. Thank you so much for writing this. I am in an x86 assembly class and I wouldn't know where to find this otherwise.

    ReplyDelete
  6. hi, I can't get permission to add this file to this folder. how do I solve this problem?

    ReplyDelete
    Replies
    1. Simply use sudo, e.g.:
      sudo cp FILE /usr/share/gtksourceview*.0/language-specs/

      Delete
    2. I'm new with ubuntu.. I get this error :
      cp: missing destination file operand after `asm-intel.lang/usr/share/gtksourceview-3.0/language-specs'
      how should I type this command?

      Delete
    3. You are using the cp command in the wrong way.
      It's very simple, go in the directory where you downloaded the asm-intel.lang file and type:
      sudo cp asm-intel.lang /usr/share/gtksourceview*.0/language-specs/

      Delete
    4. That's what I did.. in some reason now it works!! Thanks a lot!! :))

      Delete
    5. Now, in gedit : tools-->highlight mode , I search this asm /assembly .. I can't find this.
      I reopen the editor. should I do something else to get this updated?

      Delete
    6. *view--> highlight mode

      Delete
    7. I wasn't seeing the "asm-intel" highlight option either. Turns out after you copy, you need to set the permissions like the other *.lang files. I executed "sudo chmod a+r asm-intel.lang" in /usr/share/gtksourceview-3.0/language-specs and then I was able to see the asm-intel highlighting for my *.asm file. Thanks!

      Delete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Hi, I did add this file asm-intel.lang to the right folder. but when I open gedit, under view-->highlight I can't find this feature. where it should be? how do I get this updated?
    tnx!

    ReplyDelete
  9. If that matters, I program in IA32 assembly

    ReplyDelete
  10. Replies
    1. I don't have an answer for your problem

      Delete
  11. Genio divino del alma! ando joya!

    ReplyDelete