New syntax highlighting for gedit

More
21 Apr 2016 04:37 #73674 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)

File Attachment:

File Name: ngc.lang.txt
File Size:8 KB


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

File Attachment:

File Name: GCode.xml
File Size:3 KB


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
Attachments:
The following user(s) said Thank You: BigJohnT, andypugh, chucktilbury, Amedee, webmanoffesto, Studi

Please Log in or Create an account to join the conversation.

More
22 Apr 2016 22:19 #73731 by BigJohnT
I'm using Gedit on LinuxMint 17.3 but don't see the directories you mention.

JT

Please Log in or Create an account to join the conversation.

More
23 Apr 2016 08:27 #73738 by Amedee
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 or Create an account to join the conversation.

More
23 Apr 2016 11:32 - 23 Apr 2016 11:51 #73744 by BigJohnT
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
Attachments:
Last edit: 23 Apr 2016 11:51 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
23 Apr 2016 13:01 - 23 Apr 2016 13:02 #73749 by Amedee
You need to set the color scheme as well (in the preference menu)

Attachments:
Last edit: 23 Apr 2016 13:02 by Amedee.
The following user(s) said Thank You: BigJohnT

Please Log in or Create an account to join the conversation.

More
23 Apr 2016 14:26 #73757 by BigJohnT
Now that looks much better and I even like it!

JT

Please Log in or Create an account to join the conversation.

More
19 May 2016 17:07 #74856 by webmanoffesto
It's working great for me. Thank you.

Please Log in or Create an account to join the conversation.

More
07 Nov 2020 10:01 #188582 by Studi
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
The following user(s) said Thank You: rootboy

Please Log in or Create an account to join the conversation.

More
02 Jan 2024 01:52 #289521 by tommylight
Spammer booted.

Please Log in or Create an account to join the conversation.

Time to create page: 0.690 seconds
Powered by Kunena Forum