OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: i0n0s 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 (http://www.ofpec.com/ed_depot/index.php?action=details&id=596)
-
awesome I use Notepad ++ testing it out
-
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?
-
"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
_check = true;
{
if (_x select 0 == _display) exitWith {
throw "Display is already registered";
_check = false;
};
} forEach ION_DSM_Displays;
will be converted to:
_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
#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.
-
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.
-
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.
-
Thanks for finally making it public, iOnOs (am allready using it a little bit longer and it is just great).
Xeno
-
It is very handy. I'll add it up in the ED later this evening.
-
Thanks for adding to the ED.
I've got an update:
*Strings now float over lines. So this string will get highlighted correctly:
_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.
-
VERY nice. Has now replaced that other version I was using. :good:
Absolutely LOVE the make-private-selection plugin. :clap:
-
I've updated the OFPEC Download to version 1.02
-
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? :)
-
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:
hint format ["$1 = %1", $1"];
where $1 is the variable.
Would be easy to implement. Any more ideas?
-
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.
-
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.
-
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. :)
-
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
-
It downloads and open fine for me.
-
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)
-
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.
-
Although I can open the zip with 7z, it is unreadable by Windows Explorer (Vista x64).
-
The file was a rar-archive with zip-extension :x
-
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
-
"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 (http://sourceforge.net/forum/message.php?msg_id=6700303)
-
> ... 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.
-
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...
-
Version 5.7 Notepad++
http://download.cnet.com/Notepad/3000-2352_4-10327521.html (http://download.cnet.com/Notepad/3000-2352_4-10327521.html)
-
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.
-
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 (http://arma.jonasscholz.de/files/ArmA%20Script%20Recoded.7z) - for ARMA 2
http://arma.jonasscholz.de/files/ArmAScript.rar (http://arma.jonasscholz.de/files/ArmAScript.rar) - for ARMA