GithubHelp home page GithubHelp logo

themachinist / gcode-syntax-highlighting Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 13.0 255 KB

Syntax Definition for Sublime Text that provides highlighting for G code (ISO 6983, DIN 66025, RS-274)

gcode-syntax-highlighting's Introduction

G-code syntax highlighting for Sublime Text

Syntax Definition for Sublime Text that provides highlighting for G code (ISO 6983, DIN 66025, RS-274)

Screenshot

Installation

Package Control

Press Ctrl+Shift+P to open the console

Enter:

Package Control: Install Package

Then search for:

G code

Install the package, restart Sublime Text, and enjoy!

Out of Maintenance

Hi, unfortunately I stopped maintaining this shortly after creating it. I use vim almost exclusively now, and lately there has not been much new g code to read.

gcode-syntax-highlighting's People

Contributors

manouchehri avatar themachinist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gcode-syntax-highlighting's Issues

Please help me understand how to use and modify these files

Please teach me and give me some quick pointers to be able to modify your package myself.

It's a very small package, with just 2 files, but I have some questions:

  1. Why 2 duplicate files in different formats? GcodeSyntaxHighlightingDef.tmLanguage is XML and GcodeSyntaxHighlightingDef.YAML-tmLanguage is YAML, but they contain the same data! Why? Can I delete one?
  2. Where are the colors actually set? How do you choose names and things?
  3. How do you package it up and put it in the package control manager, here?

I'd really appreciate some help on this and I can modify some things in the package myself.

Note to self: Useful links so far:

  1. https://packagecontrol.io/docs/customizing_packages
  2. https://packagecontrol.io/packages/G-code%20Syntax%20Highlighting

Whole commented lines in green

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.

Add .gcode to file format list

@gesslertell:

@the_machinist_ Hey I love to use your Sublime-Text GCode Syntax highlighter.. But I seem to be unable to add a ".gcode" to the auto select

Comments can start with semicolons

.gcode files generated by Cura use ; to denote a comment. For example:

;FLAVOR:Marlin
;TIME:13408
;Filament used: 8.36149m
;Layer height: 0.2
;MINX:109.242
;MINY:104.34
;MINZ:0.2
;MAXX:194.408
;MAXY:195.66
;MAXZ:48.6
;Generated with Cura_SteamEngine 4.2.1
M140 S60
M105
M190 S60
M104 S200
M105
M109 S200
M82 ;absolute extrusion mode
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate

Because these comments are not recognised, the output renders as:

image

Not only are they harder to differentiate by colour, but the content within the comments is subject to highlighting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.