Home   Help Search Login Register  


Author Topic: I made a Syntax Highlighting Notepad++ plugin for ArmA 3, ArmA 2 and OFP  (Read 3890 times)

0 Members and 1 Guest are viewing this topic.

Offline Lone~Wolf

  • Mission Tools & Mods
  • Members
  • *
  • Vladimir Dmitri Mikhail Andreevich Stamenov
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.
« Last Edit: 10 Oct 2014, 21:22:32 by Lone~Wolf »
Snarling creature, lurking in the background, still writing in .sqs

Offline SoldierEPilot

  • Members
  • *
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:

  • Internet connection needed;
  •   Plugins-Plugin Manager-Show Plugin Manager;
  • Select checkbox near "Automation Scripts" and    install it;
  • Reset Notepad++;
  • Place Npp.000.Privatization.cs  to "...\My Documents\NppScripts" folder

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]
//from this
_r=(random _this);
//to that
Then run the script:  Plugins-Automation Scripts-Privatization