News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
November 21, 2018, 02:48:10 PM
collapse

*
Information

Please contribute to our


Sign up for a forum account at the Front Page. | Remember to Tag your posts.
Having problems logging in to the forums? Go the front page, log out and back in again.

Author Topic: Notepad++ Custom Language File (Syntax Highlight)  (Read 1090 times)

Offline Urakka Amyx

  • Common
  • *
  • Posts: 30
    • View Profile
Notepad++ Custom Language File (Syntax Highlight)
« on: August 26, 2018, 11:11:10 PM »
Notepad ++ Syntax highlighter and styles

No invasive dll that you have to move to any folder and what not.
Just Open up npp go to language->define your language->import and select the files.

and thats it.

The file is incomplete, but when i get some time ill throw some more tags in there.

also, if you want that font, just go to torchlight DIR, and register the torchlight font to your system. :P its also great to register, because it becomes available to Photoshop as well :D
« Last Edit: August 28, 2018, 11:16:13 PM by Urakka Amyx »

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 135
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: Notepad++ Custom Language File
« Reply #1 on: August 28, 2018, 09:13:44 AM »
The file is incomplete, but when i get some time ill throw some more tags in there.

I have been planning on working on something like this anyway.  May I be allowed to contribute? 

I am hoping for an eventual minimum, of feature parity with TLDatLexer (the DLL method you mentioned). 

No invasive dll that you have to move to any folder and what not.
Just Open up npp go to language->define your language->import and select the files.

Not to mention that, said DLL file only works for 32-bit installations of Notepad++. 

That turns out to be the bigger hassle for me—if I can use a 64-bit binary, that is preferred over its 32-bit equivalent.  (Even if I have to do some something silly, like use a nightly build from the stable branch of ScummVM, because those are the only official win64 builds since v1.4.) 
« Last Edit: August 28, 2018, 06:40:38 PM by Lord Nyriox »

Offline Urakka Amyx

  • Common
  • *
  • Posts: 30
    • View Profile
Re: Notepad++ Custom Language File (Syntax Highlight)
« Reply #2 on: August 28, 2018, 02:47:04 PM »
I have been planning on working on something like this anyway.  May I be allowed to contribute? 

Yes, please. i mean its not really anything special, i wish the theming had the ability for regex. >__> would make it alot cleaner

Not to mention that, said DLL file only works for 32-bit installations of Notepad++. 

That turns out to be the bigger hassle for me—if I can use a 64-bit binary, that is preferred over its 32-bit equivalent.  (Even if I have to do some something silly, like use a nightly build from the stable branch of ScummVM, because those are the only official win64 builds since v1.4.) 

I completely understand.. took me forever to get it to work.. to much copy/paste in a program directory. I prefer not to use things like that. (external plugin installation). not that its bad, its just something i prefer.

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 135
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: Notepad++ Custom Language File
« Reply #3 on: August 28, 2018, 06:45:18 PM »
Yes, please. i mean its not really anything special, i wish the theming had the ability for regex. >__> would make it alot cleaner

As a show of good faith, an example you might try reverse-engineering (that I certainly plan to), is the Minecraft "Config Highlighter" UDL.  See the associated screenshot.

Download Page:
[https://minecraft.curseforge.com/projects/config-highlighter-for-notepad]

This is notable for the way it highlights config tags differently, depending on the tag type.

I am still looking for a functional UDL example of code-folding (the other crucial feature of TLDatLexer).  Let me know if you find one. 

I completely understand.. took me forever to get it to work.. to much copy/paste in a program directory. I prefer not to use things like that. (external plugin installation). not that its bad, its just something i prefer.


It took me forever too—but not because I did not easily figure it out. 

I got the installation right on the second or third try…only to have Notepad++ refuse to launch due to the 32-bit DLL file.  So then I procrastinated…and procrastinated…because I did not want to downgrade to a 32-bit app if a 64-bit app was available.

I did eventually do it (the inherent utility of the plugin outweighed the performance benefits of avoiding it), but I did so reluctantly, and with much griping. 

Oh, and then I had to remove all traces of my Notepad++ 64-bit program directory—because it was somehow breaking my Notepad++ 32-bit file associations. 
« Last Edit: August 28, 2018, 06:47:23 PM by Lord Nyriox »

Offline Urakka Amyx

  • Common
  • *
  • Posts: 30
    • View Profile
Re: Notepad++ Custom Language File (Syntax Highlight)
« Reply #4 on: August 28, 2018, 07:39:39 PM »
So, basically you want to  use the dll, but you dont like having to downgrade your 64bit. correct?. You could make a 64 bit version for yourself. I mean notepad++ plugins are pretty easy to make depending on your knowledge of programming. if you would like, i could take a look and try to reverse engineer the TLdatLexer


Never mind
https://bitbucket.org/Jarcho/tldatlexer/src/9f4994de048fa0591b8cd8721a1e27249921aaff/TlDatLexer/?at=master

Should be simple enough to just rebuild in a 64 bit architecture, ill reinstall Visual studios and check it out to see if i can get it to work.

UPDATE:: Downloading VS over a tether is ... painful. :P
« Last Edit: August 28, 2018, 08:47:39 PM by Urakka Amyx »

Offline Urakka Amyx

  • Common
  • *
  • Posts: 30
    • View Profile
Re: Notepad++ Custom Language File (Syntax Highlight)
« Reply #5 on: August 28, 2018, 08:04:15 PM »
And also, As far as folding, im currently working on that ^_^

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 135
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: Notepad++ Custom Language File
« Reply #6 on: August 29, 2018, 12:59:58 PM »
And also, As far as folding, im currently working on that ^_^

I just examined your updated code.  That definitely helps me to understand the limits of code-folding.

However, you should be able to make your folding rule generic:

Code: [Select]
            <Keywords name="Folders in code1, open">]</Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close">[/</Keywords>

It will probably have to be tweaked, but this is as close to a "generic" rule, as you can get without wildcards.

Incidentally, this should lead to the same folding behavior as TLDatLexer (opening and closing bracket tags both displayed after folding, but everything in between is successfully hidden).

If code1, code2, et cetera, use some kind of hierarchical preference system, you might be able to use known "common" group tags in a higher-priority "hardcoded" folding method, then catch the rest in a lower-priority "generic" folding method.

Because unless you want to create a hardcoded folding rule for every entry in "MEDIA/TAGS.DAT", a generic rule would be far more effective. 
« Last Edit: August 29, 2018, 11:10:36 PM by Lord Nyriox »

Offline Lord Nyriox

  • Developer
  • Rare
  • *
  • Posts: 135
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: Notepad++ Custom Language File (Syntax Highlight)
« Reply #7 on: October 26, 2018, 12:08:33 AM »
Should be simple enough to just rebuild in a 64 bit architecture, ill reinstall Visual studios and check it out to see if i can get it to work.

UPDATE:: Downloading VS over a tether is ... painful. :P

Did you ever manage to get MSVS installed?

Tags:
 

* Quick Search


* Member Information

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Mod Boards Activity

* Who's Online

  • Dot Guests: 18
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Calendar

November 2018
Sun Mon Tue Wed Thu Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 [21] 22 23 24
25 26 27 28 29 30

No calendar events were found.

* Recent Topics

Skills Expansion: Bugs Report & Ideas by Sch123
[Today at 09:48:25 AM]


Pet Variants Mod by Sch123
[November 18, 2018, 11:52:56 AM]


Equipping Weapon *Visual* to Pet? by Phiengley
[November 17, 2018, 07:03:40 AM]


Hello! by Phanjam
[November 10, 2018, 03:57:42 AM]


(Solved)Help Editing Vanilla Class (adding / taking out other vanilla Skills) by Lrv
[November 07, 2018, 05:05:55 PM]


[TL2] Ultimate Respec Lite by doudley
[November 04, 2018, 08:17:27 AM]


Torchlight Frontiers announced by Kva3imoda
[November 03, 2018, 11:10:58 PM]


Fate Items by Phanjam
[November 03, 2018, 11:10:17 PM]


FEP+ by Sch123
[November 02, 2018, 09:03:12 AM]


Skills on weapons by Sch123
[October 29, 2018, 11:15:59 AM]


Medea Pet to Class by Vkoslak
[October 26, 2018, 07:41:19 PM]


[Tool] Item Unit file maker Script by Anarch16sync
[October 26, 2018, 04:13:27 PM]


Notepad++ Custom Language File (Syntax Highlight) by Lord Nyriox
[October 26, 2018, 12:08:33 AM]


Mod Package and Publish Error by DragonDawn
[October 24, 2018, 02:31:03 PM]


Looking for Modder to Collaborate on Character Design by Exqzr
[October 23, 2018, 08:15:56 AM]

* Popular Topics