Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>gcode-helperNew to Visual Studio Code? Get it now.

gcode-helper

ctanno

|
42 installs
| (0) | Free
Gcode helper with syntax highlighting and code completion
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Extension with support for g-code

Ath the moment the following file extensions are supported:

  • .gcode
  • .spf
  • .mpf
  • .lst

Highlighting of line numbers

The code extension is also highlighting the line numbers. The foreground colours can be adjusted in the settings. For that go to:

Settings -> Workbench -> Appearance -> Color Customizations -> Edit in settings.json

and add the follwoing section

"textMateRules": [
					{
						"scope": "linenumber.din",
						"settings": {
							"foreground": "#3E54AC"
						}
					},
					{
						"scope": "linenumber.cpl",
						"settings": {
							"foreground": "#E96479"
						}
					}

example of highlighting of the line numbers

Code definitions

This extension provides code definition for a small collection of g-code

example of extension showing definitions

Code completion

Additionally there is a support for a handful of shortcuts as well as a shortcut for section comments

example code completion

Renumbering of line numbers

General

There is also a function which allows you to renumber existing line numbers.

When a selection was made only the selection will be renumbered otherwise the whole document will be renumbered.

example of extension showing definitions

Section comments

When using section comments it might be useful to increment the line numbers afterwards. This extension can do this for you.

To use this feature you first have to enable it in the settings. For that simply search for these two settings and modify them:

  • gcode-helper.comments.sectionComments.incrementLineNumber
  • gcode-helper.comments.sectionComments.incrementLineNumberBy

example of extension incrementing line numbers after section comment

Support for BOSCH specific code

BOSCH has some quirks when it comes to g-code. For example the comparison with equal signs requires only one equal sign where as regular g-code uses two. This extension can also handle to most obvious syntax errors.

Example g-code example of extension showing error because g-code uses one equal sign as compare statement

Requirements

In order to know if a file contains BOSCH specific CPL code the first line has to start with ;BOSCH

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft