Quantcast
Channel: Ubuntu – Greg Freeman's Blog
Viewing all articles
Browse latest Browse all 12

How to add a mime type for actionscript to Ubuntu/Mint and edit them with gedit

$
0
0

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.

sudo vim /usr/share/mime/packages/actionscript.xml

Copy and paste the the following into actionscript.xml

<?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:

cd /usr/share/gtksourceview-2.0/language-specs
sudo wget http://conic.se/static/blog/code/Langfiles/actionscript.lang

Finally, update your mime database:

sudo update-mime-database /usr/share/mime

 


Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images