G-Code for Visual Studio CodeThe premier Visual Studio Code extension for G-Code
✨ FeaturesAdaptive Syntax HighlightingCtrl+Shift+P CAD/CAM packages typically show the X-axis in red, the Y-axis in green, and the Z-Axis in blue. The G-Code extension follows that pattern. The adaptive syntax feature allows you to choose any of the supproted themes and get that familiar colorization. G-Code supports all of the themes that ship with VS Code, plus the GitHub theme and OneDark-Pro.
Build your own dictionaryYou no longer need to memorize dozens of obscure G and M codes! The G-Code extension includes a mechanism for you to provide your own definitions for any number of codes. Definitions can even be provided inline with the code. Using VS Code settingsShare definitions across multiple programs using VS Code's settings files. Take a look at VS Code Docs - User and Workspace Settings if you're not familiar VS Code configuration. You need to add a
Using inline definitionsAn inline definition is a comment in your code that matches the following format. An inline definition has a Note that after you add inline definitions to a file, they won't show up in a hover until the file is saved. This prevents the extension from needing to continuously scan your file for definitions. Examples of inline definitions:
A word on leading zerosWhen providing definitions, regardless of which method you use, don't use leading zeros. Provide a definition for Using the dictionaryCtrl+Shift+P You can use the command, Line NumberingCtrl+Shift+P Ctrl+Shift+P Addding, updating, or removing line numbers are not tasks you should ever need to do manually. A robust G-Code editor should make this easy as possible so you can focus on more important things. The G-Code extension provides commands to carry out these tasks on the active file. Don't forget that you can map commands to a keyboard shortcut of your choice. See Key Bindings for Visual Studio Code. Toggle CommentsCtrl+Shift+P VS Code ships with the ability to toggle comments. The built-in feature works by modifying one or more characters at the beginning of each selected line. Since it only affects the beginning of the line, it doesn't work for G-Code comments that need to be (in parentheses). The G-Code extension provides a command that will toggle parentheses at the start and end of each selected line. 📓 Release NotesDocumentation pertaining to a specific release can be found under releases, or in the project's changelog. 💻 DevelopersVS Code Token StylesEarly on I realized I needed a way to see how each VS Code theme styles the various language tokens. My approach was to get data for each theme by using the Automated DeploymentMaintainers, here's how to publish the extension to the marketplace:
As long as these requirements are met, the CD workflow should go smoothly. A release will be created, and the new version of the extension will be published to the marketplace (see ./github/workflows). |