Minecraft / Blogs

Command Block Syntax Highlighter for Notepad++

  • 22
  • 14
  • comment16
  • playlist_add
  • share
  • more_horiz
avatar Headaxe
Level 54 : Grandmaster Technomancer
415
Command Block Syntax Highlighter for Notepad++
+an Installation Tutorial for Notepad++ Languages



Hello, folks!
Recently, I created a syntax highlighter/language definition for Notepad++ which many of you might enjoy.
Well, I might not be the first one to do this, however I added quite nice coloring aswell as nice features like using "<" and ">" to collapse text in order to keep it organized.

I will first present you my concept and then give you a tutorial for installation of languages in Notepad++. (This is a tutorial blog after all)


LIST OF FEATURES
Command Highlighting
undefined
Correctly spelled commands get a purple color.
This way you can see mistakes and mispelled command easily and you also get a sense of orientation inside your text files.

Selector Highlighting
undefined
Selectors get a blue color, which helps you distinguish them from the rest of the command.
In addition to that, numbers inside selectors stand out even more due to the blue-red contrast.
(NBT Tags get aqua highlighting)

Comments and collapsable text

You can create comments which are always being displayed in green using "#".
Also, you are able to start collapsable text using "<", to close the text simply use ">".
This feature is incredibly useful for keeping your text organized and for adding categories and functions that are supposed to be hidden.

Number Highlighting
undefined
Quite often when working with command blocks, you will copy and paste the same command over and over and just change one number.
Number Highlighting makes it much easier to focus on these important things that have to be changed and helps you seeing the difference between two nearly identical commands.

String Highlighting
undefined
Strings get an orange highlighting.
Inside strings, tags, selectors, numbers, operators and more all have the same color, which makes them stand out of the rest and which suggests that all characters inside are part of the string.
Operator Highlighting
Operators such as "~" "=" "/" and more have a dark blue highlighting which also helps you seperate them from the rest of the text.
 

INSTALLATION GUIDE
Since this is a tutorial blog, I'll now also give you a tutorial for the installation of languages for Notepad++.

1. Notepad++ uses .xml files for loading language definitions into the system.
First download the file and save it somewhere on the computer, where you can access it later on.

2. Now open up Notepad++ and open the rider "Language".
You'll see a list of already existing languages and the option "Define your Language".
Click on that option.
View Image
undefined

3. Now click on "Import..." in the window that popped up and search for the file, you saved earlier on on your computer.
View Image
undefined

4. After successfully importing the language and saving it in Notepad++. you can activate it in your language options when you open up a file.
From then on, Notepad++ will associate the file with your language, so you don't have to set your language whenever you open the file.

(If you are already experienced, you can change settings such as colors inside the "User Defined" window to personalize the highlighting.
If you find any kind of highlighting errors or other bugs, please report them to me)


undefined
CreditHeadaxe
Tags

Comments : 16

star Login or register to post a comment.

Show Comments

1 - 16 of 16

  • Zampone
  • Level 1
  • New Miner
  • May 8, 2016, 4:50 pm
Thank you for this.

Is there a version for editing books as well?
  • ToadieOdie
  • Level 49
  • Master Goblin
  • November 27, 2015, 12:55 pm
OMG!!!!! *tackleglomps* I love Notepad++ and this just made my day! lol I can't believe I haven't found this sooner. Thank you so much for putting this together and sharing it! <3
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • November 27, 2015, 12:56 pm
No problem, thanks for the feedback :D
  • TerraScript
  • Level 27
  • Expert Engineer
  • June 4, 2015, 7:01 am
I LOVE YOU.
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • June 4, 2015, 10:13 am
I love you too... *hugs*
  • Zatharel
  • Level 44
  • Master Sweetheart
  • June 3, 2015, 11:49 am
oooh quite useful.
Wow, this is so helpful...  Is this windows only?
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • June 3, 2015, 11:23 am
Every OS that can run Notepad++ can also use this language definition.
ok, thanks :D
Cool! I feel like this is very useful! Not a fan of Notepad++ though. I prefer Sublime Text over it.
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • June 3, 2015, 11:23 am
I suppose that everyone has their preferences.
Well, thanks a lot for the feedback anyways ;)
  • Jmal116
  • Level 28
  • Expert Engineer
  • June 1, 2015, 12:02 pm
One thing I would find very useful would be separate highlighting colors for different levels of NBT.

For example, something like {display:{Name:"thing"}} would color the 'display' tag and brackets blue, then the 'Name' tag and brackets green or something like that. You wouldn't have to change the colors for any strings or anything, and realistically you'd only have to go 4 or 5 levels, then you could just repeat colors.
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • June 1, 2015, 1:25 pm
I wish it was possible but this isn't even a plugin.
It's essentially just a list of settings which Notepad++ uses to highlight things.
For instance, I can add a word to a list and make it appear in a certain style or I can set a starting and an end point for a highlight. (like a bracket)

I can basically only use what Notepad++ offers me and that isn't too much.
  • Jmal116
  • Level 28
  • Expert Engineer
  • June 1, 2015, 3:17 pm
Eh fair enough. I'm not really to familiar with notepad++ or what it has, it was just a thought.
  • DSJDV
  • Level 38
  • Artisan Mage
  • June 1, 2015, 8:46 am
very useful. many thanks
  • Headaxe
  • Level 54
  • Grandmaster Technomancer
  • June 1, 2015, 8:47 am
No problem.
Also, thanks for the feedback ;)

1 - 16 of 16

Show Comments

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome