Making Notepad++ look like DWC g-code editor?
-
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. -
-
-
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
-
-
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
-
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 ?
-
@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.
-
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
paramI'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.
-
@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_commandsIn 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!
-
Just installed your UDL, thank you so much for your work!
-Max