OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma3 - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Lone~Wolf on 10 Oct 2014, 20:53:09

Title: I made a Syntax Highlighting Notepad++ plugin for ArmA 3, ArmA 2 and OFP
Post by: Lone~Wolf on 10 Oct 2014, 20:53:09
Greetings denizens, it is I, your neighbourhood OFP gremlin, baring my teeth in horror at all these modern ArmA games.

Today I was procrastinating and I made a Language plugin for Notepad++ that does syntax highlighting for our scripting language.

It recognizes all commands, all Moves, all Objects, all Weapons (incl. ammo, fired & muzzles), all vanilla eventHandlers, all arithmetical functions, comments, GOTOs, and local variables. I taught it literally thousands of commands, so much so that Notepad++ groans under the weight of it.

I have attached the file below. It is in .xml format, but you'll have to unpack it from the .zip file. To install it...

Open Notepad++. Go to: Language -> Define your language... -> Import -> [select the "SQF_BIS.xml" file] to import it into your copy of Notepad++,
then click Save As...

Once you have imported it you can manually choose the language by: Language -> SQF BIS (or whatever you've chosen as the name) to force Notepad++ to use it on your current document.

Once you import it into Notepad++ it should automatically associate with .sqs, .sqf, .ext and .sqm files.

If you don't have Notepad++ you can download it directly from this link:

> http://download.tuxfamily.org/notepadplus/6.6.9/npp.6.6.9.Installer.exe

...or from here http://notepad-plus-plus.org/download/
.....or from here http://lmgtfy.com/?q=Notepad%2B%2B

It's easy to modify Languages in Notepad++. You'll have visited the page for it already by intalling this. Have a play around with the colours (found under Styler for each bit). If you find anywhere I've got some commands wrong or you think you've got a better way of doing it, please post your improvement as an exported file as an attachment to a post in this thread

Don't hate me, I made this with four hours and a lot of coffee.

Good luck.

Peace out.
Title: Re: I made a Syntax Highlighting Notepad++ plugin for ArmA 3, ArmA 2 and OFP
Post by: SoldierEPilot on 15 Oct 2014, 07:30:27
This is a realy usefull plugin (I took it from other forum section). Thanks! :clap:

Inspired of your work I even wrote my first Notepad++ script.

Private[...]; line generation in Notepad++
It's boring to make it manualy in many functions, so now we can automate it.

To use this script you need Automation Scripts plugin.
If you don't have one -  follow these  steps:

Using:

Open *.sqf file.
If this is not a simple function, but function module (sqf-file with many functions)
select one of them (between brackets)
..
Code: [Select]
.
rnd={
//from this
_r=(random _this);
_r=_r-(_r%1);
_r
//to that
}
...
Then run the script:  Plugins-Automation Scripts-Privatization