PureSyntax Notepad++ Generator
PureSyntax Notepad++ Generator
PureSyntax_Notepad++.exe generates a syntax file for Notepad++ in the xml format.
Functionnames (incl. UserLibs) are determined by use of the PB-Compiler.
Sourcecode included.
Download
Feedback welcome
Greetings - Thomas
Functionnames (incl. UserLibs) are determined by use of the PB-Compiler.
Sourcecode included.
Download
Feedback welcome
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureSyntax Notepad++ Generator
....ah, installs like a charm but the syntax highlighting does not want to work on my PC
Notepad++ 5.8.6 Unicode. WinXP 32bit.

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: PureSyntax Notepad++ Generator
Maybe you didn't create the language file correctly, it works here without problems.
BERESHEIT
Re: PureSyntax Notepad++ Generator
Hi,
thanks for sharing
(especially the code
)
I tested it and found the following:
- ElseIf is missing in Wordlist2
- the "- bondaries are not assigned (though working), as the quotes need to be in html-syntax and terminated twice:
change: <Keywords name="Delimiters">"00"</Keywords>
to: <Keywords name="Delimiters">"00"00</Keywords>
- " must be an active operator as well, otherwise the folding and highlightings are corrupted after e.g.:
("Open File",GetPathPart(CurrentFile),"Text files|"+TextExt+"|All files|*.*",0)
until the same 'error' occures the next time. You may test this:
Hint: if you like to enhance the folding, make sure that the folding -+ keywords are not listed in the wortdlist-2 as well, otherwise they won't work.
@ IdeasVacuum
I too have no problem with this generated xml in the new unicode version. Have you used any userHighlighter before? Maybe it helps opening the internal np-styler and changing something to provoke a fresh saving/rewriting.
greetings ~ Vera
thanks for sharing


I tested it and found the following:
- ElseIf is missing in Wordlist2
- the "- bondaries are not assigned (though working), as the quotes need to be in html-syntax and terminated twice:
change: <Keywords name="Delimiters">"00"</Keywords>
to: <Keywords name="Delimiters">"00"00</Keywords>
- " must be an active operator as well, otherwise the folding and highlightings are corrupted after e.g.:
("Open File",GetPathPart(CurrentFile),"Text files|"+TextExt+"|All files|*.*",0)
until the same 'error' occures the next time. You may test this:
Code: Select all
Macro OpenTextFile()
If AskSaveFile()
fname.s = OpenFileRequester("Open File",GetPathPart(CurrentFile),"Text files|"+TextExt+"|All files|*.*",0)
If fname : LoadFile(fname) : EndIf
EndIf
EndMacro
@ IdeasVacuum
I too have no problem with this generated xml in the new unicode version. Have you used any userHighlighter before? Maybe it helps opening the internal np-styler and changing something to provoke a fresh saving/rewriting.
greetings ~ Vera
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureSyntax Notepad++ Generator

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: PureSyntax Notepad++ Generator
You have to create the new language definition and save it. Look in the notepad++ help under 'user defined language'. It explains how to use the user-defined dialogue from the toolbar to do this.
BERESHEIT
Re: PureSyntax Notepad++ Generator
thx for feedback
Hint to Installation:
View / User-Defined Dialogue... / Import... is the easiest.
If you have a old pb-syntaxfile or update:
View / User-Defined Dialogue... / Select language / Remove before installation.
After Installation:
Open *.pb and
Language / PureBasic (this is only ones required)
@Vera
thx for bugreport, i am on it.
Greetings - Thomas

Hint to Installation:
View / User-Defined Dialogue... / Import... is the easiest.
If you have a old pb-syntaxfile or update:
View / User-Defined Dialogue... / Select language / Remove before installation.
After Installation:
Open *.pb and
Language / PureBasic (this is only ones required)
@Vera
thx for bugreport, i am on it.
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureSyntax Notepad++ Generator
Ah, I did not know I had to View / User-Defined Dialogue... / Import.
Works like a charm now, thank you ts-soft!
Works like a charm now, thank you ts-soft!

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PureSyntax Notepad++ Generator
you are welcomeIdeasVacuum wrote:Works like a charm now, thank you ts-soft!

Update:
added ElseIf Keyword
small changes on delimiters
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: PureSyntax Notepad++ Generator
Hi,
The boundaries appear allright now.
Btw: did you know that NP overwrites your neat xml-style
- like I already suggested for " (quote), I would also suggest to add , (comma) as activated operator. This is the only way (in np) to make these characters work as highlight-delimiters. The following example shows the difference if s.o. doesn't use blanks:
DisplayPopupMenu(#contextMenu,WinHandle,WindowX(#mainWin)+100,WindowY(#mainWin)+100)
DisplayPopupMenu(#contextMenu, WinHandle, WindowX(#mainWin)+100, WindowY(#mainWin)+100)
@ IdeasVacuum
After reading the last postings I realize that you use the install version where the settings.xmls need to be under appdata. In case you'll ever want a version to run portable just place an empty doLocalConf.xml into the app-folder and supply your settings.xmls there as well.
cheers ~ Vera
The boundaries appear allright now.
Btw: did you know that NP overwrites your neat xml-style

- like I already suggested for " (quote), I would also suggest to add , (comma) as activated operator. This is the only way (in np) to make these characters work as highlight-delimiters. The following example shows the difference if s.o. doesn't use blanks:
DisplayPopupMenu(#contextMenu,WinHandle,WindowX(#mainWin)+100,WindowY(#mainWin)+100)
DisplayPopupMenu(#contextMenu, WinHandle, WindowX(#mainWin)+100, WindowY(#mainWin)+100)
@ IdeasVacuum
After reading the last postings I realize that you use the install version where the settings.xmls need to be under appdata. In case you'll ever want a version to run portable just place an empty doLocalConf.xml into the app-folder and supply your settings.xmls there as well.
cheers ~ Vera
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi
Missing a download-file on the forums? ~ check out this backup page.
Missing a download-file on the forums? ~ check out this backup page.
Re: PureSyntax Notepad++ Generator
Is not my neat xml-style, this is the stringtranslation for xml in purebasicVera wrote:Hi,
The boundaries appear allright now.
Btw: did you know that NP overwrites your neat xml-style![]()

DoneVera wrote: I would also suggest to add , (comma) as activated operator.
Update:
Missing operator , added.
Greetings - Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: PureSyntax Notepad++ Generator
Update:
+ Hexnumbers supported
+ set Consolas as default font on win-vista and higher
+ create optional a autocomplete file! *
* you have to enable the autocomplete feature in the settings of notepad++
save the "purebasic.xml" to:
greetings - Thomas
+ Hexnumbers supported
+ set Consolas as default font on win-vista and higher
+ create optional a autocomplete file! *
* you have to enable the autocomplete feature in the settings of notepad++
save the "purebasic.xml" to:
Code: Select all
Debug GetEnvironmentVariable("ProgramFiles") + "\Notepad++\plugins\APIs"
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: PureSyntax Notepad++ Generator
Nice!
This could be useful at one time or another...
Thank you for this.
This could be useful at one time or another...
Thank you for this.