28 02 2013
How to add a mime type for actionscript to Ubuntu/Mint and edit them with gedit
On the latest ubuntu/mint installs, .as files show up as a file type of Applix Spreadsheets. The following instructions will add an actionscript mime type and set up syntax highlighting for gedit in gnome3 and cinnamon.
Create /usr/share/mime/packages/actionscript.xml with your favorite text editor.
1 |
sudo vim /usr/share/mime/packages/actionscript.xml |
Copy and paste the the following into actionscript.xml
1 2 3 4 5 6 7 8 |
<?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-actionscript"> <comment>Actionscript</comment> <glob pattern="*.as"/> <sub-class-of type="text/plain"/> </mime-type> </mime-info> |
Optional: for gedit support, do the following:
1 2 |
cd /usr/share/gtksourceview-2.0/language-specs sudo wget http://conic.se/static/blog/code/Langfiles/actionscript.lang |
Finally, update your mime database:
1 |
sudo update-mime-database /usr/share/mime |
Git/Composer slow on Debian How to Tell if Your PHP Site has been Hacked or Compromised