Open fotomas opened 9 years ago
Hi! Thanks for opening this issue. Could you share which color scheme you are using?
Uploading a screenshot would also help a lot.
Also Coloring G-Codes the same way as with M-Codes would be helpful for me. As of now the are to anonymous.
@fotomas it looks like you're using the Monokai color scheme, I get the same result here.
This syntax seems to work a lot better with the Cobalt color scheme.
Hi guys. I apologize for the delay in getting out an update. Just wanted to state that I am aware of the issue and there are some updates in process that address the issue. My semester is over in May and I will have some free time then. In the mean time feel free to make a push request. Thanks for your patience.
I adapted plugin for use with the theme Monokai extended Unpack zip in %appdata%\Sublime Text 3\Packages\ , then select View-Syntax-CNC
Work best with Fanuc Oi. For best use without file extensions, install plugin ApplySyntax and put this code in "default_syntaxes" section file ApplySyntax.sublime-settings ==> Preferences - Package settings - ApplySyntax - Settings-User
{
"name": "CNC/CNC",
"match": "all",
"rules": [
{"contains": "(G0)|(M30)"},
{"contains": "(O)"}
]
},
Any update on this? I'd love to see comment syntax highlighting working too. Many thanks.
I didn't realize anyone was still using this and I was surprised to find it in the package manager a few days ago. It's been years since I maintained this project, but I am using it again so I will take a look into this issue over the next couple of weeks.
@themachinist , yeah, people are definitely still using it. It's the only gcode syntax highlighter available in the Package Manager for Sublime Text. You've got 8000 downloads, with 2 to 6 new downloads per day, every day. See the graph here. I'm getting into 3D printers and using it now, for instance, to look at gcode files to print objects.
@digex 's zip file above works pretty well, by the way. Take a look at it for some pretty useful changes.
I installed it in Sublime Text 4 in Linux Ubuntu 20.04 like this:
G-code Syntax Highlighting
plugin like normal using the Sublime Text package Manager/home/gabriel/.config/sublime-text-3/Packages
Packages
dir, create another dir named G-code Syntax Highlighting
.This is a Marlin g-code file generated by the Cura 3D printer slicer engine.
The G-code
syntax highlighting, provided by this repo in its current state, is on the left, and the syntax highlighting provided by @digex's zip file above is on the right. It looks much better. This is in Sublime Text 4 (build 4126), with Monokai
, from Sublime Text 3, selected as the color theme:
I've completed my brand new gcode
syntax highlighter. It adds highlighting for comments, and makes many other improvements too. I've opened a PR to add it to Sublime's Package Control package too. If anyone would like to use it meanwhile, manual installation instructions are in the main readme: https://github.com/ElectricRCAircraftGuy/sublime_gcode
Bit thanks to @themachinist for paving the way on this syntax highlighter. Without his work I would not have know where to begin with this, as it was a very large undertaking for me to figure out this past weekend and each evening up to now.
Screenshots:
It is a bit difficult to distinguish commented lines (starting with semicolon) from live lines. I suggest that the commented lines are in one one color that differs from all the other colors. Preferably green. The fact that M-commands are highlighted in in commented lines are bit confusing.