Home   Help Search Login Register  

Author Topic: ArmAScript - A notepad++ plugin (ACCEPTED)  (Read 18516 times)

0 Members and 1 Guest are viewing this topic.

Offline i0n0s

  • Moderator
  • *****
ArmAScript - A notepad++ plugin (ACCEPTED)
« on: 14 Jan 2009, 01:43:08 »
Since notepad++ is a useful tool for programming, but sadly it didn't have support for SQF. My problem solves this by adding a lexer for SQF and adds support for folding.

Just take a look at the attached "ArmAScript.png" for details.
Additional function will get highlighted with different colors depending on the effect and the locality of the parameter.

Also a hint with displays should be displayed when hovering about a word.

In the plugin menu, you're able to set folding-settings. Additional you can introduce the private variables either on the hole document or within a selection. Sadly this is limited since it ignores scopes and existing private-statements. Nevertheless it is very useful :)

How to install:
If you are clever and have installed N++ in local mode, you can simple copy the content either of the ansi or the unicode folder into the plugin folder.
If installed globally, the content of the Config folder belongs to $APPDATA\Notepad++\plugins\config. The rest stays the same as when having it installed locally.

Changelog:
1.01:
*Fixed call tips
*Added auto indentation

1.02:
*Strings can float lines
*Styling of global and local variables possible

1.03:
*Removed version warning
*Corrected "introduce private statement"
*Autoindent will get saved over sessions
*Added "hint "variable""
*Added ability to disable call tips

Get ArmA Script Notepad++ plugin v1.03
« Last Edit: 10 Feb 2009, 17:34:35 by Mandoble »

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: ArmAScript - A notepad++ plugin
« Reply #1 on: 14 Jan 2009, 01:53:44 »
awesome I use Notepad ++ testing it out
Xbox Rocks

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: ArmAScript - A notepad++ plugin
« Reply #2 on: 14 Jan 2009, 05:45:28 »
Brilliant Iionos!  Thanks man, Notepad++ is a great tool, and now its Arma-fied!  I just tried it out, and it works great.  :clap:  The coloring is very helpful, and general NotePad smarts of brace pairing etc. is very useful.

Under the Plugins menu, I see ArmaScript with many options (fold, introduce, indentation) etc., but I can't figure out how to use them.  Any hints on this?
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin
« Reply #3 on: 14 Jan 2009, 12:18:26 »
"Introduce private-statement":
Place the cursor at the line, where you one to have the private statement to be placed. Then press the button.

"Introduce private-statement (selection)":
Select the code in which the local variables should get collected, then click the button. The private statement will get inserted at the beginning of the selection.

"Create intendation": (*sick*, typo :( )
The current active document will get indented automatic (when displayed as SQF).
So
Code: [Select]
_check = true;
{
if (_x select 0 == _display) exitWith {
throw "Display is already registered";
_check = false;
};
} forEach ION_DSM_Displays;
will be converted to:
Code: [Select]
_check = true;
{
if (_x select 0 == _display) exitWith {
throw "Display is already registered";
_check = false;
};
} forEach ION_DSM_Displays;

The settings are for the folding.
When having "fold preprocessor" active, you can fold
Code: [Select]
#ifdef
   Bla
#endif
"fold comment" allows to fold the /* */ comment structure.
"fold arrays" allows to fold arrays ( [ ] ).
"fold compact" will hide blank lines after folded code.
"fold at else" will at a fold point to the else, so you can fold the 'then' part or the 'else' part and are not forced to fold the complete if-statement.

Offline Trexian

  • Members
  • *
Re: ArmAScript - A notepad++ plugin
« Reply #4 on: 14 Jan 2009, 21:46:49 »
Ah!  I found a NP++ plugin a long time ago and have been using it.

http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=71;t=58206

Will certainly give yours a try, too.

Sic semper tyrannosauro.

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin
« Reply #5 on: 16 Jan 2009, 12:47:01 »
Updated to 1.01:
The call tips should now work independent which view is used.
I also added a "auto indentation" feature which automatic indent when encountering a '{' and '}'. You can enabled or disabled this feature in the plugin menu.

Offline Xeno

  • Members
  • *
Re: ArmAScript - A notepad++ plugin
« Reply #6 on: 16 Jan 2009, 19:46:52 »
Thanks for finally making it public, iOnOs (am allready using it a little bit longer and it is just great).

Xeno

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: ArmAScript - A notepad++ plugin
« Reply #7 on: 16 Jan 2009, 19:48:34 »
It is very handy. I'll add it up in the ED later this evening.
Xbox Rocks

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #8 on: 22 Jan 2009, 22:43:58 »
Thanks for adding to the ED.

I've got an update:
*Strings now float over lines. So this string will get highlighted correctly:
Code: [Select]
_ctrl ctrlSetEventHandler ["MouseButtonDown", format ["
if (_this select 1 == 0) then {
(ION_DSM_Dialog select %1) set [9, true];
(ION_DSM_Dialog select %1 select 10) set [0, _this select 2];
(ION_DSM_Dialog select %1 select 10) set [1, _this select 3];
};", _element]];
*Added styling possibility for global and local variables.
Use Settings->Styler Configuration to change the color.

Offline Trexian

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #9 on: 23 Jan 2009, 18:22:28 »
VERY nice.  Has now replaced that other version I was using.   :good:

Absolutely LOVE the make-private-selection plugin.   :clap:
Sic semper tyrannosauro.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #10 on: 23 Jan 2009, 18:48:59 »
I've updated the OFPEC Download to version 1.02
Xbox Rocks

Offline Trexian

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #11 on: 24 Jan 2009, 00:23:09 »
Heya i0n0s,

Very pleased with this.  In using it, I had an idea similar to your make-private-list function.  Any way to select a variable then in the line below the one selected, have it create a line:

hint format [" *variable name without the underscore* = %1", *variablename*];
sleep 1;

Or something like that? :)
Sic semper tyrannosauro.

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #12 on: 24 Jan 2009, 01:57:00 »
Would be possible.
So you have the cursor in a variable, then you select the action.
The next step would be that I create a new line, then enters:
Code: [Select]
hint format ["$1 = %1", $1"];where $1 is the variable.
Would be easy to implement. Any more ideas?

Offline Trexian

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #13 on: 24 Jan 2009, 17:27:46 »
Not yet, but I'll try to think of something.... :)

I find it very thorough already.  LOVE the hints. Is there an option to turn them off?  At this point, I wouldn't want to, but someone else might.
Sic semper tyrannosauro.

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #14 on: 10 Feb 2009, 16:26:19 »
Updated to 1.03

No, I haven't forgotten lightAttachObject..., Notepad++ 5.2 changed its version number style and therefore the previous version complains about a too old version.

I also changed the "introduce private statement" functions. It didn't catch all local variables, variables with more than one '_' weren't detected. Also the private statement will get the right indentation level.

You can now disable the call tips and I've added Trexians request.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #15 on: 10 Feb 2009, 20:03:38 »
Thanks for the update i0n0s  :good:

I am very sorry for having posted the review of mine so far.  :confused:
So much different stuff I am doing right now - especially Roller and ACEIP v1.1 are meant to be out finally.

I was/am digging into NP++ to see how to make it as useful as possible for arma editing.
So far I have checked a lot of great features it offers, added several apps and urls with params to launch from within NP++, as well as reviewing all the interesting features and their key assignments.
Code templates are next on my list. Yet I still need to adapt to NP++ and use it for some time on arma
projects to get a good feel for it and how to use it best.

Anyways, hopefully I am done soon to share the review of NP++ along with the great review of you!
It will be part of the Community Modding Bible project I am working on as well.  :)

Offline Rommel92

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #16 on: 14 Feb 2009, 07:41:32 »
I've downloaded this about four times now, each time it finishes, then mentions its corrupt. Perhaps another mirror please? I've used it before and it ran fine, but now I can't re-download it.  :o

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #17 on: 14 Feb 2009, 10:46:07 »
It downloads and open fine for me.

Offline Rommel92

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #18 on: 14 Feb 2009, 23:55:26 »
Works fine now. Ah well thanks for the reply, maybe it just needed a nights rest.  :confused:

edit: "Datei nicht gefunden ArmAscript.xml" is the error I get when I load up the plugin in the latest NPP (5.2)
« Last Edit: 15 Feb 2009, 00:09:24 by Rommel92 »

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #19 on: 15 Feb 2009, 00:24:01 »
Missing translation O:-)
"File not found: ArmAScript.xml".
The ArmAScript.xml has to be placed within the config-folder. Either in Plugins/Config or in %APPDATA%\Notepad++\Config.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #20 on: 04 Mar 2009, 15:00:20 »
Although I can open the zip with 7z, it is unreadable by Windows Explorer (Vista x64).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #21 on: 04 Mar 2009, 17:30:38 »
The file was a rar-archive with zip-extension :x

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #22 on: 04 Mar 2009, 18:36:59 »
It is now a ZIP format with .rar extension, but that means it will open with explorer, making it more accessible! Yes, really (ok, this needs fixing!).

Edit by i0n0s:
Fixed
« Last Edit: 04 Mar 2009, 19:30:57 by i0n0s »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline i0n0s

  • Moderator
  • *****
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #23 on: 11 Mar 2009, 01:51:18 »
"Update":
*Removed marker for changed lines since added to N++ 5.3 RC

First external lexer, then auto complete and now this feature...
Next step will be SQF highlighting without an addon ;)

Notepad++ 5.3 RC

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #24 on: 11 Mar 2009, 07:33:03 »
Quote
> ... is that the Line change state doesn't follow Undo-Redo actions accurately, ...
 
Yes I know it. This feature is experimental, and still buggy - I wonder if it's worth to include it in the release. But since I spent time to implement it, I would like to know what people think about it.

Offline Dwinar

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #25 on: 10 Jul 2010, 19:54:26 »
It would be cool if someone could take care of dead links such as this... :blink:
This tool looks cool but I can't download it because link of the download is dead as always...

Offline Tora

  • Members
  • *
  • I'm a llama!
« Last Edit: 10 Jul 2010, 21:34:16 by Tora »

Offline Dwinar

  • Members
  • *
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #27 on: 10 Jul 2010, 21:33:30 »
Sorry but the title says "notepad++ *plugin*" I thought it's about the you know... the plugin for notepad++ that highlight the sqs/sqf syntaxes. I guess I was wrong I'm sorry.

Edit:
@Down
Ok, no problem. Someone should just remove this thread from site as it is dead.
« Last Edit: 10 Jul 2010, 21:40:02 by Dwinar »

Offline Tora

  • Members
  • *
  • I'm a llama!
Re: ArmAScript - A notepad++ plugin (ACCEPTED)
« Reply #28 on: 10 Jul 2010, 21:36:06 »
The link for Notepad was dead, too.  (Thought that was what you meant)-I edited my first post so it didn't sound so "snippy" - Sorry for the confusion...

Here are the other links:

http://arma.jonasscholz.de/files/ArmA%20Script%20Recoded.7z - for ARMA 2
http://arma.jonasscholz.de/files/ArmAScript.rar - for ARMA

« Last Edit: 10 Jul 2010, 21:43:10 by Tora »