Jump to content


Photo

WeiDU Highlighter for Notepad++

highlighter notepad++ WeiDU

  • Please log in to reply
32 replies to this topic

#21 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 05 January 2021 - 02:11 AM

New update: WeiDU Highlighter for Notepad++ 3.15

Note: For technical reasons this release is only available from GitHub.

Changes:
  • Added new TP2 keywords introduced by WeiDU 247
  • Added several missing TP2 keywords
  • Added more symbols and keywords to BAF, D and TP2
  • Added more internal TP2 variables
  • Removed syntax folding from TP2
  • Fixed ambiguous coloring of several TP2 keywords
  • Internal cleanups


#22 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 25 January 2021 - 02:10 PM

Seems you forgot to include the new DEFINE_DIMORPHIC_FUNCTION keyword. ;)


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#23 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 25 January 2021 - 02:29 PM

Seems you forgot to include the new DEFINE_DIMORPHIC_FUNCTION keyword. ;)


It's there and it works for me. Do other additions like RESOURCE_CONTAINS or METADATA work?

Maybe the import operation didn't work properly. Try removing and re-adding the TP2 highlighter.



#24 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 25 January 2021 - 03:15 PM

They did not work.

In fact, it seems Notepad++does not like when you remove and add more than one highlighter at once. I remove them one by one (exiting after each removal), then imported them one by one (exiting after each importation). And it works now. :wacko:


Edited by Gwendolyne, 25 January 2021 - 10:31 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#25 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 25 January 2021 - 03:21 PM

Yeah, the language importer in Notepad++ could be improved. I usually remove all old highlighter versions, close N++, restart N++ and import the new highlighter versions. It worked well so far for me.



#26 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 26 January 2021 - 01:04 AM

I found another issue: it is impossible to fold-unfold blocks.

Comparing WeiDU_TP2.xml v3.15 with v3.14, the following lines have disappeared:

 

<Keywords name="Folders in code2, open">BEGIN ALWAYS QUICK_MENU WITH IF_EXISTING ON_DISABLE ON_MISMATCH LAUNCH_ACTION_FUNCTION LAUNCH_FUNCTION_ACTION LAF LAUNCH_PATCH_FUNCTION LAUNCH_FUNCTION_PATCH LPF &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close">END &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</Keywords>


I am using Notepad++ v7.7.1 32bits (because I need one plugin not available for later versions).
 


Edited by Gwendolyne, 26 January 2021 - 01:04 AM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#27 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 26 January 2021 - 01:25 AM

I removed folding from TP2 (see changelog) because it never worked well enough for me to be useful. I can add it again if someone actually uses it.



#28 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 26 January 2021 - 04:44 AM

Oops! I did not notice this changelog line.

 

Even if it was not 100% efficient (mainly with BEGIN END ELSE loops), I found it very convenient when working with large libraries (such as IA ones). I might do it myself if it is not difficult to achieve. Would a copy-paste from v3.14 folder lines do the trick?


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#29 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 26 January 2021 - 05:22 AM

Yes, copying the two "Folders in code2" lines is enough. I have already made the changes in the devel branch of the project.



#30 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 26 January 2021 - 06:32 AM

Thanks! You saved my life. ;)


CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.

#31 Sam.

Sam.
  • Modder
  • 1158 posts

Posted 26 January 2021 - 09:53 AM

Thanks for the update Argent77!

 

Even after deleting the old XML files, I couldn't get Notepad++ to delete/forget all of the old WeiDU_* user defined languages.  The solution was to go to the

%appdata%\Notepad++

folder and delete "userDefineLang.xml".  I could then add the new ones as described in readme.txt.


"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#32 Argent77

Argent77
  • Staff
  • 1178 posts

Posted 26 January 2021 - 11:28 AM

I also had some trouble this time. There were some garbage characters left in the font name fields of the languages which resulted in the editor using the ugly Courier New font for several highlighting groups. I had to manually clean it up in %appdata%\Notepad++\userDefineLang.xml. It looks like there is still room for improvement for Notepad++.



#33 Gwendolyne

Gwendolyne
  • Staff
  • 1002 posts

Posted 26 January 2021 - 09:41 PM

Thanks for the update Argent77!

 

Even after deleting the old XML files, I couldn't get Notepad++ to delete/forget all of the old WeiDU_* user defined languages.  The solution was to go to the

%appdata%\Notepad++

folder and delete "userDefineLang.xml".  I could then add the new ones as described in readme.txt.


I forgot to mention: I also experimented that. When removing WeiDU highlighters, this file always keeps track of the last one. So it is impossible to really remove it. The only way to get rid of the last highlighter after removing it in the User language menu is to delete this file.


Edited by Gwendolyne, 26 January 2021 - 09:42 PM.

CARPE DIEM ....
 

In progress : Menace sur le Royaume de Diamant Éternel there.





Also tagged with one or more of these keywords: highlighter, notepad++, WeiDU