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

    Making Notepad++ look like DWC g-code editor?

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    7
    10
    1.0k
    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.
    • Exerqtorundefined
      Exerqtor
      last edited by Exerqtor

      Is there a way to make Nopepad++ look like the g-code editor does in DWC?
      I've looked at and tried using a couple "languages" but i don't feel like they do as good of a job at highlighting functions the way DWC does.

      dc42undefined GordonNundefined 2 Replies Last reply Reply Quote 1
      • Exerqtorundefined Exerqtor marked this topic as a question
      • dc42undefined
        dc42 administrators @Exerqtor
        last edited by

        @exerqtor see https://www.apharmony.com/software-sagacity/2014/10/creating-custom-udl-user-defined-languages-in-notepad/.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • ComedianTF2undefined
          ComedianTF2
          last edited by

          I've created a super simple UDL, I use the night mode in notepad++, not tested it with white background

          https://github.com/ComedianTF2/RepRapFirmware-UDL-For-Notepad

          ComedianTF2undefined 1 Reply Last reply Reply Quote 2
          • GordonNundefined
            GordonN @Exerqtor
            last edited by GordonN

            @exerqtor Here is a start, https://zero-divide.net/?&article_id=4809_notepad-absolutely-free-g-code-editor-with-code-highlighting. Also: https://www.youtube.com/watch?v=b9KDVV3xKm0

            1 Reply Last reply Reply Quote 0
            • ComedianTF2undefined
              ComedianTF2 @ComedianTF2
              last edited by

              I have updated the UDL I made with better colors based on the latest RRF version, with both a dark mode and light mode skin

              I was however not able to figure out how to match the styling of certain parts. RepRapFirmware for example does X200 with the X being either white/black, and then the 200 part having color.

              For the life of me, I could not figure out how to implement that behavior, so I just grouped them as one

              https://github.com/ComedianTF2/RepRapFirmware-UDL-For-Notepad

              Exerqtorundefined 1 Reply Last reply Reply Quote 3
              • Exerqtorundefined
                Exerqtor @ComedianTF2
                last edited by Exerqtor

                @comediantf2

                Sweet, it's for sure the best solution so far! 😃

                @comediantf2 said in Making Notepad++ look like DWC g-code editor?:

                I have updated the UDL I made with better colors based on the latest RRF version, with both a dark mode and light mode skin

                I was however not able to figure out how to match the styling of certain parts. RepRapFirmware for example does X200 with the X being either white/black, and then the 200 part having color.

                For the life of me, I could not figure out how to implement that behavior, so I just grouped them as one

                https://github.com/ComedianTF2/RepRapFirmware-UDL-For-Notepad

                Guess you might have some inputs in that reguard @chrishamm ? 😅

                chrishammundefined 1 Reply Last reply Reply Quote 0
                • chrishammundefined
                  chrishamm administrators @Exerqtor
                  last edited by

                  @exerqtor You can have a look at https://github.com/Duet3D/DuetWebControl/tree/master/src/components/dialogs/FileEditDialog for details about the syntax parsing/highlighting in DWC. Because the current CodeMirror component is rather outdated now, I may eventually replace it with something else in v3.5.

                  Duet software engineer

                  1 Reply Last reply Reply Quote 2
                  • mikeabuilderundefined
                    mikeabuilder
                    last edited by mikeabuilder

                    This is very nice. I'm trying to add a few things, but I've never made a UDL before so maybe I'm putting these in a wrong place...
                    Keyword lists - adding to 3rd group:
                    var
                    param

                    I'd also like to figure out how to style the characters following a var. or param. I'll spend some more time with the UDL documentation to see if it gets me anywhere. Also, if I get ambitious, I might try to start an XML file for RRF auto completion. I would count each gcode as a function and it would be sweet to have the parameters and description info for each of the gcodes.

                    ComedianTF2undefined 1 Reply Last reply Reply Quote 2
                    • ComedianTF2undefined
                      ComedianTF2 @mikeabuilder
                      last edited by

                      @mikeabuilder
                      I've gone through this list and added all the gcode meta commands, including var and param: https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands

                      In notepadd++, to change the stylers you can go to language -> user defined languages -> define your language -> pick the language from the dropdown and then you can change the stylers

                      For the var and param for example. they are in the 3rd group. You can change the styler, or put it in a different styler.

                      I've used a VERY basic grouping, so absolutely do use and adapt it to your own liking! If you send me a message or a Github pull request I'll very gladly add it to the UDL!

                      MaxGyverundefined 1 Reply Last reply Reply Quote 4
                      • MaxGyverundefined
                        MaxGyver @ComedianTF2
                        last edited by

                        @comediantf2

                        Just installed your UDL, thank you so much for your work! 👍
                        -Max

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