Jump to content
Larrow

UltraEdit Syntax Highlighting & Templates for Arma3

Recommended Posts

Seeing as W0lles original thread seems to have disappeared here is my current up to date wordfile for UltraEdit/UEStudio (UE & UES).

Installation instructions

 

Installing syntax highlighting ( UE v15+ & UES )

On the menu bar goto 'Advanced > Configuration'. (UES Advanced > Settings) (name will be either Configuration/Settings depending on version)
Pick 'Editor Display > Syntax highlighting'.
Check the box next to 'Enable syntax highlighting'.
At the top you will see 'Full directory path for word files'.
Place the included sqf.uew in the directory shown.
Restart UltraEdit.

On the menu bar goto 'Advanced > Configuration'. (UES Advanced > Settings)
Under 'Editor > Auto-complete' check the box next to 'Show auto-complete dialog automatically'.
And choose how many chars before auto complete is displayed. (I personally prefer 3)

Goto the section 'Editor Display >> Syntax highlighting', you can switch the option 'Highlight new file as..' and pick ARMA3 form the list.
This will make it so you can start writing Arma script in a new file without having to choose 'View As' or save the file with a compatible extension first.

On the menu bar goto 'View > Themes > Manage Themes'. (UES Layout > Themes > Manage Themes)
Under the Syntax tab choose Arma3 in the drop down Language list, you can now change the colours for the different sections of the wordfile as listed further down in this post.
As well as the wordfile sections you can also set your default colours for things like numbers, strings and comments here.


Installing smart templates ( UE v18+ & UES )

On the menu bar goto 'Advanced > Configuration'. (UES Advanced > Settings)
Pick 'Directories'.
Place the included sqf-tpl.xml in the folder shown under 'Template Directory'
Restart UltraEdit.

Either start a new file( if you have used the 'Highlight new file as..' step in installing syntax highlighting above )
or
Open a file of type .sqf

On the menu bar goto 'View > Views/Lists > Template List' (UES Layout > Templates List)
In the Templates Panel that opens you should now see an entry called Arma3 click the + to expand the section to look at the templates available.
Double clicking any of the entries will insert the template at your current cursor position.

To further enhance the use of smart templates on the menu bar goto 'Advanced > Configuration'. (UES Advanced > Settings)
Then under 'Templates' check the boxes next to

  • Auto-suggest smart template whilst typing
  • Include templates in auto-complete dialog
  • Maintain indent level when inserting templates

Now whilst writing script the auto-complete will show options with a green T symbol, these are templates which match and can be inserted.

 

 

Enhancing syntax highlighting with link to BI Wiki

 

All word lists are correctly capitalised so can be used in your browser of choice to open the correct wiki page for each command/function.

 

On the menu bar goto 'Advanced > User Tools > Configure Tools'.

Give the Menu Item a name BIKI for example.

Command Line


D:\Utils\Internet\Firefox\firefox.exe http://community.bistudio.com/wiki/%sel%

Working Directory


D:\Utils\Internet

And you can provide your own icon if you wish( if the tool is placed on the ribbon it will display this icon).

Make sure to replace your path to the browser of choice.

Press Insert to add the user tool.

 

On the menu bar goto 'Advanced > Configure(in the macro section) > Edit Macro'.

Press New Macro button. Give it a name for example Wiki and add your hotkey of choice (for example I use Alt + 1). Press OK,

With the macro selected in the dropdown add the below to the left hand window.


InsertMode
ColumnModeOff
HexOff
SelectWord
RunTool "BIKI"

 Where BIKI is what you called the tool in the previous section.

Close the window and press Yes to update macros.

 

On the menu bar goto 'Advanced > Configure(in the macro section) > Save All Macros'.

On the menu bar goto 'Advanced > Configure(in the macro section) > Set Macro for Auto Load'.

Select the macro file you saved above.

 

Now when ever you press the hot key you assigned, the word under the cursor will be selected and the relevant Wiki page opened in your browser. This macro will always be available as it is loaded every time you open UE/UES.

 



A total rewrite using the BISim version as a base. Includes sections for..

  • Arma3 commands
  • Control structures (for if forEach etc)
  • Variable types (objNull LocationNull etc)
  • Local variables
  • Labels and Operators (#define _EXEC etc)
  • Special (magic variables)
  • BIS functions

and some basic Regex for filling Variable and Function lists
 
Also included is a template list for some of the more verbose commands. For instance typing createMarkerIcon will insert..

_mrk = createMarkerLocal [ _name, _position ];
_mrk setMarkerShapeLocal "ICON";
_mrk setMarkerTypeLocal "Empty";
_mrk setMarkerDirLocal _dir;
_mrk setMarkerColorLocal "ColorBlack";
_mrk setMarkerAlphaLocal _alpha;
_mrk setMarkerTextLocal _text;

With TAB selection allowing you to insert variable names, whether is local, Icon type and colors from available Arma options.
Also included templates for EventHandler params, templates are EH<name of EH> eg EHKilled or EHUI<name of EH> e.g EHUIKey which covers keyUP keyDown and will add the template...

params[
    "_ctrl", //"_display"
    "_keyCode",
    "_shft",
    "_ctr",
    "_alt"
];

DOWNLOAD

 

Scripts for pulling command and function wordfiles

Spoiler

Commands


commands = [];
{
	_string = _x;
	_op = _string splitString ":";
	_type = _op select 0;
	_string = _op select 1;
	_op = _string splitString " ";
	{
		_firstChar = _x select [ 0, 1 ];
		if !( _firstChar isEqualTo toUpper _firstChar ) then {
			_nul = commands pushBackUnique _x;
		};
	}forEach _op;
}forEach ( supportInfo "" );
copyToClipboard str commands;

Functions


_return = [ 13, 10 ];
_functions = "";
{
	_tag = getText( _x >> "tag" );
	if ( _tag == "BIS" ) then {
		{
			{
				_functions = formatText[ "%1BIS_fnc_%2%3", _functions, configName _x, toString _return ];
			}forEach ( "true" configClasses( _x ));
		}forEach ( "true" configClasses( _x ));
	};
}forEach ( "true" configClasses( configFile >> "CfgFunctions" ));

copyToClipboard str _functions

Template options

 

Actions


_classes = ( "true"configClasses( configFile >> "CfgActions" )) apply { configName _x };
_classes sort true;
_actions = "[+";
{
	_actions = formatText[ "%1%2%3", _actions, _x, [ "", "|" ] select ( _forEachIndex < (( count _classes ) -1 ) ) ];
}forEach _classes;
_actions = format[ "%1+]", _actions ];
copyToClipboard _actions;

Input Actions


_actions = [];
{
	_cfg = ( _x >> "Mappings" );
	_props = configProperties[ _cfg, "true" ] apply{ configName _x };
	{
		_nul = _actions pushBackUnique _x;
	}forEach _props;
}forEach ( "true" configClasses ( configFile >> "CfgDefaultKeysPresets" ));
_actions sort true;
_inputActions = "[+";
{
	_inputActions = format[ "%1%2%3", _inputActions, _x, [ "", "|" ] select ( _forEachIndex < (( count _actions ) -1 )) ];
}forEach _actions;
_inputActions = _inputactions + "+]";
copyToClipboard _inputActions;

 

 

All 1.54 (plus some from Dev branch) commands including some that are absent from the Wiki
Updated to 1.58

Updated commands and functions to 1.62

Updated commands, functions and templates to 1.64

Updated commands, functions and templates to 1.66

Updated commands, functions and templates to 1.68

Updated commands, functions and templates to 1.70

Updated commands, functions and templates to 1.72

Updated commands, functions and templates to 1.76

Updated commands, functions and templates to 1.78

Share this post


Link to post
Share on other sites

Thanks foxhound.

Share this post


Link to post
Share on other sites

larrow , thanks for this, I like it better than notepad++ .. my only issue is no read me..

I cant get the template to work..

I added the xml to template/language/sqf-tpl

but I don't see it doing anything..

but really liking this ..

Share this post


Link to post
Share on other sites

Added instructions into OP. Hopefully they are correct as i have been using UE for more than 10 years and is highly customised to my liking.

Let me know if your still having problems.

Share this post


Link to post
Share on other sites

ok I think I got it I was using UEstudio.

settings just a little different ..

 

very cool tool ....

Share this post


Link to post
Share on other sites

Updated Download in OP with syntax file for 1.58.

Also updated some of the templates like addEventHandler and addMissionEventHandler with new EH types.

And a bunch of new templates for more commands.

Share this post


Link to post
Share on other sites

Updated commands and functions to 1.62

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.64

Share this post


Link to post
Share on other sites

Nope. Of what exactly? A bunch of code sitting on a page? What benefit would that provide? Im sure if you need screenshots of UE or UES IDM have plenty on their product page.

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.66

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.68

Share this post


Link to post
Share on other sites

man I was messing with this again, wow.. this is some real good stuff .. I love the template .. I think I'm going to be using this a lot more .

I was to used to the other editors out there, I forgot I had this.

so from this point on I deleted the other 2 , (not because they don't work) but its to easy to use what I'm used to and I really need to get used to this editor ..

thanks again for this Larrow

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.70

  • Like 1

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.72

Share this post


Link to post
Share on other sites

Updated commands, functions and templates to 1.76

Added instructions on how to open Biki page for a selected command/function via hotkey.

Added code examples for pulling command and function data for the wordfiles

  • Like 2

Share this post


Link to post
Share on other sites

Just loaded up your update. Checked a couple of the new commands and BIS_fnc.  Looks good.  Thank you for the update!

 

Fire

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×