Free DNS provides easy shared DNS hosting & URL forwarding
Showing posts with label gedit. Show all posts
Showing posts with label gedit. Show all posts

Sunday, August 2, 2009

Octave files misdetected as Objective-C

As you may noticed from the previous post's screenshot, GEdit misdetects my Octave .m files as Objective-C code files (because both share the same file extension). Because I don't use Objective-C, I tried to fix this problems like this:

  1. I edited the file /usr/share/mime/packages/freedesktop.org.xml, commenting out the mime-type tag with type text/x-objcsrc (just search for text/x-objcsrc and you'll find it).
  2. After saving this file, I ran the following command:
    sudo update-mime-database /usr/share/mime/
  3. Last, I restarted GEdit.

It didn't seem to work, so I did the following thing:
sudo rm /usr/share/gtksourceview-2.0/language-specs/objc.lang.
This worked fine.

Octave taking over Matlab

I'm trying to replace my Matlab R12/Windows habit with Octave 3/Linux. I installed the QtOctave IDE, but it seems to bulky (especially because I use Gnome). I didn't liked it, so I uninstalled it.

Next I tried another approach: I installed the gedit-plugins package which contains the embeded terminal plugin and enabled the filesystem and embeded terminal plugins. My GEdit window setup looks like similar to Matlab's default view, except for the workspace and history sidepanes (which I didn't use much anyway).

I also added the file .octaverc in my home directory and added this line to it:
edit EDITOR 'gedit %s'
This command makes Octave's edit command to open files in the gedit (instead of default emacs).