- Posts: 457
- Thank you received: 0
New syntax highlighting for gedit
10 years 6 months ago #73674
by FernV
New syntax highlighting for gedit was created by FernV
Hi,
For those of you that prefer using gedit, I wrote a new HL file for you.
Just copy ngc.lang.txt file to either (REMOVE THE .txt EXTENSION)
/usr/share/gtksourceview-3.0/language-specs/
or
~/.local/share/gtksourceview-3.0/language-specs/ (you can also use 2.0 instead)
and GCode.xml (colors) in
/usr/share/gtksourceview-3.0/styles/
or
~/.local/share/gtksourceview-3.0/styles/
then restart gedit, open a ngc file and select GCode color scheme
here what it looks like
If you do not like the colors I selected, try to find a scheme you like or edit GCode.xml by inspecting ngc.lang to see how colors are mapped
Best regards
Fernand
For those of you that prefer using gedit, I wrote a new HL file for you.
Just copy ngc.lang.txt file to either (REMOVE THE .txt EXTENSION)
/usr/share/gtksourceview-3.0/language-specs/
or
~/.local/share/gtksourceview-3.0/language-specs/ (you can also use 2.0 instead)
Attachment not found
and GCode.xml (colors) in
/usr/share/gtksourceview-3.0/styles/
or
~/.local/share/gtksourceview-3.0/styles/
then restart gedit, open a ngc file and select GCode color scheme
Attachment not found
here what it looks like
Attachment not found
If you do not like the colors I selected, try to find a scheme you like or edit GCode.xml by inspecting ngc.lang to see how colors are mapped
Best regards
Fernand
Please Log in to join the conversation.
10 years 6 months ago #73731
by BigJohnT
Replied by BigJohnT on topic New syntax highlighting for gedit
I'm using Gedit on LinuxMint 17.3 but don't see the directories you mention.
JT
JT
Please Log in to join the conversation.
10 years 6 months ago #73738
by Amedee
Replied by Amedee on topic New syntax highlighting for gedit
I don't have Mint, but i believe it is shipped with GTK2 so you need to look for /usr/share/gtksourceview-2.0/ directory
Please Log in to join the conversation.
10 years 6 months ago #73744
by BigJohnT
Replied by BigJohnT on topic New syntax highlighting for gedit
LinuxMint 17.3 has both /usr/share/gtksourceview-2.0 and /usr/share/gtksourceview-3.0. Let me try that and see what I get.
Edit: after some experiments I determined that /usr/share/gtksourceview-3.0 is the correct place however my G code does not look like Ferns example.
JT
Edit: after some experiments I determined that /usr/share/gtksourceview-3.0 is the correct place however my G code does not look like Ferns example.
Attachment not found
JT
Please Log in to join the conversation.
10 years 6 months ago #73749
by Amedee
Replied by Amedee on topic New syntax highlighting for gedit
You need to set the color scheme as well (in the preference menu)
Attachment not found
Please Log in to join the conversation.
10 years 6 months ago #73757
by BigJohnT
Replied by BigJohnT on topic New syntax highlighting for gedit
Now that looks much better and I even like it!
JT
JT
Please Log in to join the conversation.
- webmanoffesto
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
10 years 5 months ago #74856
by webmanoffesto
Replied by webmanoffesto on topic New syntax highlighting for gedit
It's working great for me. Thank you.
Please Log in to join the conversation.
5 years 11 months ago #188582
by Studi
Replied by Studi on topic New syntax highlighting for gedit
hello FERN
got it installed. Works as promised.
Thank you so much! :Lachen:
Tip: For Windows users
the path to the directories is called here:
Storage location of the program then \ share \ gtksourceview-2.0 \ language-specs
for the file: ngc.lang
and
Storage location of the program then \ share \ gtksourceview-2.0 \ styles for the file: GCode.xml
got it installed. Works as promised.
Thank you so much! :Lachen:
Tip: For Windows users
the path to the directories is called here:
Storage location of the program then \ share \ gtksourceview-2.0 \ language-specs
for the file: ngc.lang
and
Storage location of the program then \ share \ gtksourceview-2.0 \ styles for the file: GCode.xml
Please Log in to join the conversation.
1 year 9 months ago #318580
by jherzvt
Replied by jherzvt on topic New syntax highlighting for gedit
Thank you so much to FernV for this. It is just what I was looking for and the old links from the LinuxCNC manual were dead.
Two comments though, from this extremely inexpert user.
The first is that in my version of UbuntuStudio 24.04 with Kde both the language-specs and the styles directories are in /usr/share/libgedit-gtksourceview-300/
The second is that after I put Gcode.xml into the styles directory, highlighting did not work until I renamed Gcode.xml to ngc.xml
Now it works great!
thanks, Jonathan
Two comments though, from this extremely inexpert user.
The first is that in my version of UbuntuStudio 24.04 with Kde both the language-specs and the styles directories are in /usr/share/libgedit-gtksourceview-300/
The second is that after I put Gcode.xml into the styles directory, highlighting did not work until I renamed Gcode.xml to ngc.xml
Now it works great!
thanks, Jonathan
Please Log in to join the conversation.
Time to create page: 0.305 seconds
