ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: Kaikaku on Mar 28, 2021, 09:13 AM

Title: Notepad++ Syntax Highlighting for CC:Tweaked
Post by: Kaikaku on Mar 28, 2021, 09:13 AM
Is there currently a syntax highlighting for Notepad++ available?
My searches only brought up dead links on the old forum and on reddit.

To improve future search results, let me add, that this will change
<Language commentLine="--" ext="lua" name="lua">
in the langs.xlm file.
Title: Notepad++ Syntax Highlighting for CC:Tweaked
Post by: Lupus590 on Mar 28, 2021, 11:42 AM
If you are willing to try another editor out then the CC pack (https://marketplace.visualstudio.com/items?itemName=lemmmy.computercraft-extension-pack) for VSCode (https://code.visualstudio.com/) is very good.
Title: Notepad++ Syntax Highlighting for CC:Tweaked
Post by: Kaikaku on Mar 28, 2021, 02:10 PM
Looks quite powerful, but not sure if I'd like to change.
Actually, it was a video showing this pack, that made me want highlights in Notepad++ :)
Title: Notepad++ Syntax Highlighting for CC:Tweaked
Post by: Kaikaku on Mar 28, 2021, 08:31 PM
I'm messing a bit around with the highlighting (not 100% understanding what I do).
It's better now, not complete, but it's probably enough for me to try it out. Not sure if I invest some time in a more systematical approach.

What I did so far (not sorted, not complete, probably the wrong type).

In the langs.xml file I added to lua (search for: name="lua") to the name="type2" data this keywords:

turtle turtle.place turtle.placeUp turtle.placeDown turtle.forward turtle.back turtle.up turtle.down turtle.turnLeft turtle.turnRight turtle.currentSlot os.pullEvent term.write term.clear term.setCursorPos turtle.getSelectedSlot turtle.getItemCount turtle.getFuelLevel turtle.equipRight turtle.equipLeft rs.getSides peripheral.isPresent peripheral.getType printError sleep colours colors commands disk fs gps help http paintutils parallel peripheral rednet redstone keys keys.getName settings shell multishell term textutils

As some languages also have a "type3" I tried this first, but it seems not to be that simple.
If you try to use my bumbling approach, please make a backup of your langs.xml first!

Edit: Sorry, for turtle.place there is automatically a link created and can't get rid of it.