Is there a way to tell gedit that .sage files shou

2019-07-21 10:30发布

问题:

Well, that's about all there is to say. Currently I have to set the highlighting on each file by hand, which is getting annoying, especially since it sometimes forgets and I have to set it again.

I'm using gedit 3.6.1 on a lubuntu machine, if that matters.

Sorry if this is a really easy question, but I haven't been able to figure it out myself. Thanks.

回答1:

Thanks to Fredrik's comment I found an easy solution, although it seems like more of a hack than one would want.

go to

/usr/share/gtksourceview-3.0/language-specs/python.lang

and edit line 30 to say

<property name="globs">*.py;*.sage</property> 

instead of

 <property name="globs">*.py</property>