Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-08-17 16:01:46

jondo
Member
Registered: 2020-08-17
Posts: 2

Mousepad syntax highlighting not working

Hello,

I am on Debian 10 with xfce 4.12 and mousepad 0.4.1. I observe that Python scripts opened with mousepad get the filetype detected as Document > Filetype > Script > Python, but I don't get any actual highlighting: All text stays the default black on white.

What could be wrong?

Best regards,
Robert

Last edited by jondo (2020-08-17 16:02:36)

Offline

#2 2020-08-17 18:25:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Mousepad syntax highlighting not working

Hello and welcome.

There is an old bug in that version of mousepad. You need to set the Color Scheme to anything but "None". Classic is the default one.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-08-18 07:22:06

jondo
Member
Registered: 2020-08-17
Posts: 2

Re: Mousepad syntax highlighting not working

That worked, thank you!

Offline

#4 2022-02-12 20:44:49

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Mousepad syntax highlighting not working

I have a slightly different problem with recognizing shell scripts without the extension appended. I don't append the .sh extension to my shell scripts (most POSIX shell scripts on my system do not have it), which makes them unrecognizable to GtkSourceView. I have these properties set in language-specs (even commented out the globs property):

<language id="sh" name="sh" version="2.0" _section="Script">
  <metadata>
    <property name="mimetypes">text/x-shellscript;application/x-shellscript;text/x-sh</property>
<!--    <property name="globs">*.sh;*bashrc;.profile;.bash_profile</property> -->
    <property name="line-comment-start">#</property>
  </metadata>

Is my only option here to start appending the extension?


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#5 2022-02-13 01:01:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Mousepad syntax highlighting not working

Which version of mousepad are you using? 0.4.90 added the ability to infer filetype from the shebang line. Do your scripts have shebang lines?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2022-02-13 05:47:39

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: Mousepad syntax highlighting not working

ToZ wrote:

Which version of mousepad are you using?

Its version is 0.4.2 on Xubuntu 20.04.

0.4.90 added the ability to infer filetype from the shebang line.

Thanks. I see that now. Perhaps I can request a backport.

Do your scripts have shebang lines?

Of course I do, though POSIX leaves it unspecified.


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.008 seconds, 8 queries executed - Memory usage: 548.12 KiB (Peak: 548.96 KiB) ]