You are here: Home / Past Courses / Fall 2016 - ECPE 170 / Tutorials / gedit Syntax Highlighting

gedit Syntax Highlighting

The gedit Text Editor provides automatic syntax highlighting for a variety of programming languages, but not for our favorite language - MIPS assembly!   Warren Whitman adapted an existing incomplete style sheet and updated it for the assembly instructions we are likely to use in ECPE 170.

To install, first download the style sheet: mips.lang

Second, copy it into the directory that holds style sheets for all the supported languages:

sudo cp mips.lang /usr/share/gtksourceview-3.0/language-specs/ 
sudo chmod 644 /usr/share/gtksourceview-3.0/language-specs/mips.lang

(If your Linux distribution uses an older 2.x version of gedit, simply change 3.0 to 2.0 in the above path)

Third, launch gedit and enjoy your new, colorful programming environment!  Syntax highlighting should be automatically applied to all files ending in the .asm extension.

gedit_colors.png