Jump to content


Photo

WeiDU Highlighter for Notepad++

highlighter notepad++ WeiDU autocompletion

  • Please log in to reply
38 replies to this topic

#21 Argent77

Argent77
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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.
  • Administrator
  • 1338 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
  • Administrator
  • 1434 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
  • Administrator
  • 1016 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.


#34 Argent77

Argent77
  • Administrator
  • 1434 posts

Posted 08 April 2023 - 12:26 AM

New update: WeiDU Highlighter for Notepad++ 4.0

This release introduces autocompletion support for TP2, D and BAF files as well as function parameter help for BAF files. Installation instructions have been updated in the readme of the package and the first post of this thread.

Changes:

  • added auto-completion support for TP2, BAF and D files
  • improved coloring and structure of syntax highlighters
  • removed "colorize string" tags in TRA highlighter to fix false positives
  • added variable WEIDU_VER to TP2
  • restored syntax folding in TP2


#35 Azazello

Azazello

    The Anti-Spammer

  • Staff
  • 1912 posts

Posted 08 April 2023 - 06:45 AM

Argent77, thanks very much for the update!

#36 agris

agris
  • Member
  • 50 posts

Posted 08 April 2023 - 10:58 AM

New update: WeiDU Highlighter for Notepad++ 4.0

This release introduces autocompletion support for TP2, D and BAF files as well as function parameter help for BAF files. Installation instructions have been updated in the readme of the package and the first post of this thread.

Changes:

  • added auto-completion support for TP2, BAF and D files
  • improved coloring and structure of syntax highlighters
  • removed "colorize string" tags in TRA highlighter to fix false positives
  • added variable WEIDU_VER to TP2
  • restored syntax folding in TP2


Thanks Argent77! Are you considering color compatibility with any of the NPP dark color schemes?



#37 Argent77

Argent77
  • Administrator
  • 1434 posts

Posted 08 April 2023 - 11:09 AM

Thanks Argent77! Are you considering color compatibility with any of the NPP dark color schemes?

I haven't used dark color schemes in Notepad++ yet, but I can certainly experiment with them. Changing colors is rather trivial (in theory) since the actual syntax definitions don't have to be touched.



#38 agris

agris
  • Member
  • 50 posts

Posted 09 April 2023 - 01:25 PM

Thanks Argent77! Are you considering color compatibility with any of the NPP dark color schemes?

I haven't used dark color schemes in Notepad++ yet, but I can certainly experiment with them. Changing colors is rather trivial (in theory) since the actual syntax definitions don't have to be touched.


It would certainly be nice if your colors accounted for standard Dark Mode -> Black. I haven't used this release, but used 3.15 and it's kinda hard on the eyes.



#39 Argent77

Argent77
  • Administrator
  • 1434 posts

Posted 05 December 2024 - 11:28 AM

New update: WeiDU Highlighter for Notepad++ 5.0

This release adds dark themes, syntax highlighting support for WeiDU.log, and fixes several bugs.

Changelog:

  • added dark themes for TP2, BAF, D and TRA syntax highlighting (thanks WillScarlettOhara)
  • added autocompletion definitions for dark themes (thanks Bubb)
  • added syntax highlighting for WeiDU.log and WeiDU-BGEE.log files
  • fixed nesting flags for tilde delimiters in D files
  • fixed typos






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