Checking BBCode with Notepad++ (Advanced Usage)

If you'd like a little more color or for certain types of tags to pop out at you, then here are a few options that may help.  

Coloring the Operators

In the Language->Define Your Language->Operators style->Operators 1 box, you may want to put:
= | -- :
Notepad++ Lang Operators
Then click 'Styler' and choose a color.  

Coloring the Names of the Tags Using Keywords

If you'd like the tags colored so they're easier to tell from other tags you can choose the Keyword Lists tab and put the tag names in the group boxes, then click the 'Styler' to pick a color for each group you fill in.
Notepad++ Keyword lists.PNG
  It may help to group similar commands together and color each group differently. Such as:
1st Group
b /b i /i u /u s /s sup /sup sub /sub color /color hr small /small dc /dc in /in concol /concol redacted
2nd Group
url /url img spotify youtube soundcloud podbean kuula email container /container
3rd Group
right /right left /left center /center justify /justify scroll /scroll updown /updown
4th Group
quote /quote spoiler /spoiler hide /hide code /code aloud /aloud noparse /noparse
5th Group
table /table tr /tr td /td th /th
6th Group
h1 /h1 h2 /h2 h3 /h3 h4 /h4
7th Group
row /row col /col
8th Group
ul /ul li /li ol /ol
  This isn't meant to be a comprehensive list of the BBCode tags. You'll need to check the 'WORLD ANVIL TAGS REFERENCE' at the bottom or the editor screen or see the Codex for commands available and formatting .   **Also please note that any word you list as a tag will apply to your delimiter (instructions below) will be colored. So if you are using the [table][/table] tags and the keyword options are set, and you happen to be writing about a table in a room for your setting, that word table will also be colored in your code in Notepad++.  

Using the Operator Colors and the BBCode Tag Colors

Under 'Operators and Delimeters', click the 'Styler' for the 'Delimeter 1' box (or whichever one you put your [ ] to set apart your BBCode in the first article, Checking BBCode with Notepad++ tutorial. Then under 'Nesting' click any of the keyword groups or operator groups you filled in that you want to be colored.
Notepad++ Delimeter 1 styles.PNG
  Example of colored BBCode text:
Notepad++ BBcode keywords and operators colored
Can you see the error in line 4 more clearly now? The URL and LI tags aren't closed properly.  

Switching Back and Forth

If you'd like to switch back and forth between all the colors for tags and just the single color, leave the 'User Defined Languages' window open and check and uncheck the style boxes for the keywords and operators under 'Nesting'. The view will update on the fly.  

Backing up your BBCode Language Settings

To backup your BBCode settings, click 'Export' in the 'User Defined Languages' window and give your .xml file a meaningful name.   If you need to restore the settings, just click 'Import' in the same window.


Comments

Please Login in order to comment!
Powered by World Anvil