QuickBMS Notepad++ User-defined Language
-
- Posts: 161
- Joined: Sat Dec 13, 2014 1:01 am
QuickBMS Notepad++ User-defined Language
I use Notepad++ to create and edit QuickBMS scripts (makes indentation easier). However today I looked into making custom syntax colouring and such for it, and it wasn't too hard. Basically I just made it colour various commands and data types, as well as comments and strings. It makes script a bit more readable and less bland to look at. It also allows you to collapse if statements and loops.
I've attached an XML file with the language definition. To use it, in Notepad++ go to Language -> Define your language, then click Import and select the XML file. It should automatically detect .bms files to be displayed using that definition.
Hopefully this is helpful for some people, I definitely think it makes scripts easier to read
I've attached an XML file with the language definition. To use it, in Notepad++ go to Language -> Define your language, then click Import and select the XML file. It should automatically detect .bms files to be displayed using that definition.
Hopefully this is helpful for some people, I definitely think it makes scripts easier to read
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS Notepad++ User-defined Language
There is also one on my website:
http://aluigi.org/papers/bms/userDefineLang.xml
I have only to add few recent algorithms and a couple of commands but it should be quite complete.
Maybe take a look at it too.
http://aluigi.org/papers/bms/userDefineLang.xml
I have only to add few recent algorithms and a couple of commands but it should be quite complete.
Maybe take a look at it too.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS Notepad++ User-defined Language
I have just updated it by adding NameCRC and Codepage plus all the remaining compression and encryption algorithm that have been introduced in the recent versions.
-
- Posts: 161
- Joined: Sat Dec 13, 2014 1:01 am
Re: QuickBMS Notepad++ User-defined Language
Ah, didn't know that existed. That one's much better than mine
Guess I'll be using that now, thanks!
Guess I'll be using that now, thanks!
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: QuickBMS Notepad++ User-defined Language
aluigi wrote:I have just updated it by adding NameCRC and Codepage plus all the remaining compression and encryption algorithm that have been introduced in the recent versions.
Sorry for the necropost but I can't finded this subject on another place so... there's some problem with the comment tags "/**/", you can see what I'm talking about in this script: http://aluigi.altervista.org/bms/nxpk.bms
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS Notepad++ User-defined Language
@Delutto
Here I see no problems with nxpk.bms. The only "weird" thing is that both "if" and "endif" are red but the comment is perfectly handled.
Here I see no problems with nxpk.bms. The only "weird" thing is that both "if" and "endif" are red but the comment is perfectly handled.
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: QuickBMS Notepad++ User-defined Language
Exactly, I was talking about the Np++ User-defined Language, not the script itself.aluigi wrote:@Delutto
Here I see no problems with nxpk.bms. The only "weird" thing is that both "if" and "endif" are red but the comment is perfectly handled.
-
- Posts: 75
- Joined: Sun Jan 10, 2021 2:23 pm
Re: QuickBMS Notepad++ User-defined Language
Fixed.
There are two versions:
1) fixed as shown and exported (20 KB)
2) manually patched as text (27 KB)
There are two versions:
1) fixed as shown and exported (20 KB)
2) manually patched as text (27 KB)
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
-
- Posts: 75
- Joined: Sun Jan 10, 2021 2:23 pm
Re: QuickBMS Notepad++ User-defined Language
Fixing resulted issue.
Enabled folding of comments. (compact, expand) There's a great plugin used to get context help: Language Help by Franco Stellari But it's fully functional for help files in specific formats.
Also added (seek_set seek_cur seek_end) to 7th group, (exit) to 1st. Enabled folding of comments. (compact, expand) There's a great plugin used to get context help: Language Help by Franco Stellari But it's fully functional for help files in specific formats.
The other good solution would be console like help: getdstring /?The help file path may point to a local CHM, HLP, or PDF files for keyword search.
Alternatively, the field may point to a command/file that will be shell executed.
This include HTML file both on the local machine and on the internet.
-
- Posts: 75
- Joined: Sun Jan 10, 2021 2:23 pm
Re: QuickBMS Notepad++ User-defined Language
Show commands arguments and short description.
Place xml in installDir\autoCompletion-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
-
- Posts: 75
- Joined: Sun Jan 10, 2021 2:23 pm
Re: QuickBMS Notepad++ User-defined Language
Thanks!
NP++ doesn't allows space as function start, sadly. That's why question mark is used.
To change the descriptions, one can either modify the resulted xml or modify the powershell script and produce new xml.
Function overload is not supported, with single exception - and it looks great! Would be good to make it for all the functions.
If someone interested to have QBMS syntax in 010 Editor, there's draft with keywords only.
Also interested to add QBMS syntax in AkelPad.
NP++ doesn't allows space as function start, sadly. That's why question mark is used.
To change the descriptions, one can either modify the resulted xml or modify the powershell script and produce new xml.
Function overload is not supported, with single exception - and it looks great! Would be good to make it for all the functions.
If someone interested to have QBMS syntax in 010 Editor, there's draft with keywords only.
Also interested to add QBMS syntax in AkelPad.