Text editors

From BISim Wiki - Mirror I
Jump to: navigation, search

While it is possible to create scripts and config files with Windows' regular Notepad, dedicated editors have features like auto-completion, syntax highlighting and bracket matching that makes scripting and troubleshooting a lot easier.

The latest wordfiles, and instructions on how to set up syntax highlighting for the most popular editors at BIA are listed below:

Contents

Wordfiles

The required syntax definitions for Notepad++, TextPad & UltraEdit can be found in this file: WordFiles.zip

Notepad++

  1. Download the latest version of the wordfile, and extract it.

  2. Get userDefineLang.xml from this SVN repo: p:\doc\Text Editors\Notepad++.

  3. Open Windows Explorer, and enter %appdata%\Notepad++ in the address bar.
    notepad1.gif

  4. The entered address (%appdata%\Notepad++) will be converted into something similar to C:\Users\username\AppData\Roaming\Notepad++.

    Copy the file userDefineLang.xml into this folder
    notepad2.gif
    (If you already have a userDefineLang.xml file, then merge the "VBS2" section into the existing file.)

  5. If you now open a file with an extension of SQS or SQF, Notepad++ will automatically highlight the defined keywords.
    notepad3.gif

  6. To edit the associated extensions, display attributes (e.g. the highlight colors), or the command list, select "View | User-Defined Dialogue...", select "VBS2" from the "User Language" drop-down list, and adjust the settings to your liking.
    notepad4.gif


UltraEdit

V15 and later

  1. Download the latest version of the wordfile, and extract the "Version 15 and higher part".

  2. Make sure UltraEdit is closed.

  3. Open Windows Explorer, and enter %appdata%\IDMComp\UltraEdit\wordfiles in the address bar.
    ultraedit1.gif

  4. The entered address (%appdata%\IDMComp\UltraEdit\wordfiles) will be converted into something similar to C:\Users\ltd\AppData\Roaming\IDMComp\UltraEdit\wordfiles.

    Copy the file VBS2_Script.uew into this folder.
    ultraedit2.gif

  5. To edit the display attributes, open "Advanced | Configuration", and select "Syntax Highlighting" from the Navigation group "Editor Display".

    Select "ArmA/OFP/VBS2 Scripts" from the "Language Selection" drop-down list on the right, choose the desired "Color Group", and then adjust the foreground and background colors to your liking.
    ultraedit3.gif

  6. More instructions are available here: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/add_a_wordfile.html

V14 and earlier

  1. Download the latest version of the wordfile, and extract the "Version 14 and lower part".

  2. Open your existing wordfile in UltraEdit, by going to "Advanced | Configuration", and selecting "Syntax Highlighting" from the Navigation group "Editor Display".
    Click on the "Open" button next to the path to the current wordlist file.
    ultraeditold.png

  3. Append VBS_Scripts.txt to the end of the current wordfile.
    The first line of the language definition section starts with /L20 (this indicates the index of the language, with a maximum of 20).
    Make sure there is no other section that has the same index. If there is one already, find a free index, and use that one instead for the VBS2 section.
  4. More instructions are available here: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/add_a_wordfile_pre_v15.html

Auto-complete

To enable auto-completion, go to "Advanced|Configuration" - "Editor|Auto-complete", and check the "Show auto-complete dialog automatically" option.
ultraedit4.gif
Be aware though, that auto-completion will always use lowercase for all commands.


Textpad

Version 5 and higher

  1. Download the latest version of the wordfile, and extract it.

  2. Get the syntax definition files from this repo:
    p:\doc/\Text Editors\TextPad

  3. Make sure Textpad is closed.

  4. Copy the two *.syn files into the "Samples" subfolder of your TextPad installation folder (e.g. Program Files\TextPad 5\Samples).

  5. Open Textpad, and select "Configure | New Document Class...".

  6. As "Document class name", enter "SQF", click "Next".
    textpad1.gif

  7. As "Class members", enter "*.sqf", click "Next".
    textpad2.gif

  8. Check "Enable syntax highlighting", and select "sqf.syn" from the "Syntax definition file" drop-down lists.
    textpad3.gif
    Click "Next" and "Finish".

  9. To edit the associated extensions and the display properties, select "Configure | Preferences...", and open the "SQF" branch in the "Document Classes" tree.
    textpad4.gif

  10. More instructions are available here: http://www.textpad.com/add-ons/syna2g.html
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox