I'm trying to use gedit for two different tasks: developing Python software and writing Latex documents. Both are based on pure text files, but they are very different: e.g. Python code needs to be aligned to be able to see the structure of the code (loops, functions, …). Therefore a Monospace font is a good thing. For writing a Latex document, I mainly need readability. This is best achieved with a font that is used in printing and definitly NOT a monospace font.
Is there a way to tell gedit to use per-file-type preferences? E.g. Garamond for *.tex and Monospace for *.py? (But this problem is not limited to the fonts, and also not to Latex and Python).
Best Answer
ok, since it seems not possible, I put together a proto-plugin for gedit2 that works for me at the moment. I still hope that someone has a better answer...
~/.gnome2/gedit/plugins/mimeprefs.py
~/.gnome2/gedit/plugins/mimeprefs.gedit-plugin
EDIT: update for gedit3: plugin files go in
~/.local/share/gedit/plugins/
and look like this:mimeprefs.plugin:
mimeprefs.py: