views:

364

answers:

1

The gedit external tools plugin allows tools to apply to only one or more of a predefined list of file types.

How do I define my own file types?

+1  A: 

Could you be more specific? What language?

Do yo want to add support for another programming language in gtksourceview - maybe you want to add code snippets for this language?

If this language is already supported

Then you have to find the language description and mime type files and install them on your system. You'll find these embedded in plugins packages (example: Gmate).

Here's an example for YAML:

  • find the language description file (yml.lang) and copy it to your ~/.local/share/gtksourceview-2.0/language-specs/ directory
  • find the mime-type file (x-yaml.xml) and copy it to your ~/.local/share/mime/package/
  • restart gedit; this language should show up the language list; you can now add your own snippets!

If you can't find any resource for this language (is this a custom language?)

Well, you'll have to write the whole thing. The mime-type file is pretty basic (just mapping file extensions to your newly created mime-type).

But writing your own language file is not straightforward.

These links should be useful to that matter:

Brian Clozel
Thanks for the detailed reply!SuperCollider (an audio-specific smalltalk dialect).Language files already exists, and you just showed how to add them.

related questions