Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Reprap G-Code syntax now part of RJ TextEd text editor

    Scheduled Pinned Locked Moved
    General Discussion
    3
    11
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OwenDundefined
      OwenD
      last edited by

      Just a note to advise that the creator of RJ TextEd has added the Reprap G-Code syntax files I created to the main program. (I am not affiliated in any way, I just happen to use it).

      RJ Text Ed

      So as of version 14.41 you can go to the new document drop-down list and select Reprap G-Code
      newfile.png

      I've tried to make auto-completion as complete and useful (to newbies) as possible by having G-Codes the object model and the correct syntax for if-else blocks etc. by also having links to the dozuki help section for that code and giving an empty if/else block etc.
      Obviously this part will have to be updated as the object model develops.
      Also I'm not used to languages which use indenting for flow control (Mainly use delphi/pascal), so can't guarantee a mistake free implementation.

      autocomp1.png autocomp2.png autocomp3.png

      1 Reply Last reply Reply Quote 2
      • chas2706undefined
        chas2706
        last edited by

        @OwenD said in Reprap G-Code syntax now part of RJ TextEd text editor:

        ust a note to advise that the creator of RJ TextEd has added the Reprap G-Code syntax files I created to the main program. (I am not affiliated in any way, I just happen to use it).
        RJ Text Ed
        So as of version 14.41 you can go to the new document drop-down list and select Reprap G-Code

        Just downloaded version 14.41 and RepRap G-Code is NOT in the dropdown list.

        RJ TextEd.png

        1 Reply Last reply Reply Quote 0
        • OwenDundefined
          OwenD
          last edited by OwenD

          EDIT:

          My mistake.
          Just did a full uninstall/reinstall.
          It seems the syntax file is not in the 14.41 download, but IS in the update file.
          The link is just below the main download.

          You THEN have to go to
          Environment >> Add-ons and select it in the list of active highlighters
          addons.png

          1 Reply Last reply Reply Quote 0
          • OwenDundefined
            OwenD
            last edited by OwenD

            You also need to go into the options and enable whatever auto completion and html link following options etc you want.

            That is to say RTFM 🤘
            options.png options2.png

            1 Reply Last reply Reply Quote 0
            • chas2706undefined
              chas2706
              last edited by

              @OwenD said in Reprap G-Code syntax now part of RJ TextEd text editor:

              EDIT:
              My mistake.
              Just did a full uninstall/reinstall.
              It seems the syntax file is not in the 14.41 download, but IS in the update file.
              The link is just below the main download.
              You THEN have to go to
              Environment >> Add-ons and select it in the list of active highlighters

              Got it Thanks.

              1 Reply Last reply Reply Quote 0
              • OwenDundefined
                OwenD
                last edited by OwenD

                I have added some new object model items to the code completion syntax file and also added mouse-over hints for most GCode commands and object model functions.

                Requires RJ Texted version 14.5 beta 1 or later for hints to work!

                Updated syntax file is here

                Some video here

                Screen shots
                mod() code completion
                highlight1.jpg

                Mod() hint mouse-over
                highlight2.jpg

                1 Reply Last reply Reply Quote 2
                • OwenDundefined
                  OwenD
                  last edited by

                  I have updated the syntax file for RJ TextEd to include more object model items.
                  I have also included a suggested colour format file.
                  You will need to update RJ TextEd to the latest version in order to take advantage of hints etc.

                  Download here

                  Replace the existing files (reprap.syx, reprap.ini) in C:\Users"yourname"\AppData\Roaming\RJ TextEd\Syntax
                  Copy the file "Reprap Dark.xml" to C:\Users"yourname"\AppData\Roaming\RJ TextEd\Syntax color themes\

                  To install.
                  1: Go to ENVIRONMENT > THEMES > CUSTOMISE
                  step1.png

                  2: Select "Reprap G Code" from the drop down list of highlighters
                  step2.png

                  3: Click the button, and select import colors from file
                  step3.png

                  4: Select the "Reprap Dark.xml" file previously copied.

                  You can customize the colours to suit yourself.
                  Different G Code parameters such as X, Y, Z , E, F, G etc can be coloured to make individually.
                  Likewise, comments and other items can be individually coloured.
                  colors.png

                  1 Reply Last reply Reply Quote 4
                  • OwenDundefined
                    OwenD
                    last edited by

                    I'm not sure that the Reprap Firmware syntax file I created is being installed by default anymore.
                    I think it was changing too rapidly.
                    Anyway, I have just uploaded the latest version of the syntax file if anyone is using it.

                    Download from the RJ TextEd forum
                    https://www.rj-texted.se/Forum/viewtopic.php?f=4&t=4813

                    or from my google drive
                    https://drive.google.com/file/d/1D-rgpotqU647yfLAryguhP6uK8KHwBcY/view?usp=sharing

                    1 Reply Last reply Reply Quote 3
                    • OwenDundefined OwenD referenced this topic
                    • OwenDundefined OwenD referenced this topic
                    • fcwiltundefined fcwilt referenced this topic
                    • fcwiltundefined fcwilt referenced this topic
                    • OwenDundefined
                      OwenD
                      last edited by

                      I have updated the syntax files to include the new G Codes introduced in RRF 3.4.x
                      I have also updated the hyperlinks to point to the new docs pages.

                      Download here

                      https://www.rj-texted.se/Forum/viewtopic.php?p=18275#p18275

                      tom33undefined 1 Reply Last reply Reply Quote 0
                      • tom33undefined
                        tom33 @OwenD
                        last edited by

                        @OwenD is it possible to use it with visual studio code ?

                        OwenDundefined 1 Reply Last reply Reply Quote 0
                        • OwenDundefined
                          OwenD @tom33
                          last edited by

                          @tom33 said in Reprap G-Code syntax now part of RJ TextEd text editor:

                          @OwenD is it possible to use it with visual studio code ?

                          No, I wouldn't think so.
                          Each editor seems to have their own format for the syntax highlighting files.
                          There is at least one GCode syntax extension for VS Code
                          You could create your own
                          https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
                          I note that it uses the same format as YAML

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA