Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: au
Location: Sydney
Occupation: unemployed (junior game dev c++)
Age: 24
In-game name: Zanven

 
#1 Posted at 2014-10-02 01:59        
     

SQF Syntax for Brackets

by
zanven


Description:
Sqf Syntax for Brackets is a plugin for the code editor Brackets. It is a open source editor which is hackable by nature and available on github. this plugins goal is to offer syntax highlighting to make working with and reading sqf files easier. providing a autocomplete/code hint on All keywords in the sqf language for Arma3 (currently only arma3 but arma2 syntax is possible if high demand, i would have to put some kind of button to toggle between them and have it save).and to quickly provide the documentation on bohemia wiki to make understanding and learning how to use keywords easy without needing about a million tabs open in chrome.


Features:
  • Syntax highlighting (all arma3 keywords are highlighted)
  • Autocomplete (automatically gives code suggestions which are ordered by word length)
  • Quick documentation (right click and select "quick docs" or ctrl + k. while having a word selected to bring up)
  • Quick links to bohemia wiki for keywords (including the see Also suggestions)

  • This image shows where to click to open plugin manager to install the plugin just search for "sqf syntax for brackets".
    note the second line of syntax which says "(Alternate Syntax exists check Read more)". is their because the bohemia wiki has 2 different syntax's with different params and returns available. and for simplicity of the quick doc it was dropped and a reference was left instead. do note that the secondary syntax is used in the examples of every file this happens in and in most cases doesn't require looking at the wiki

    Image demonstrating all features:


    the see also section was blank because "private" has no other related keywords. here's a better demonstration of the syntax highlighter and the see also section of the documentation



    the "Read more" button is a link to the bohemia wiki on the keyword. and the donate button is a paypal donation link for anyone who feels like donating.


    Installation:
    1. download and install brackets from Brackets.io
    2. Open the plugins manager from the right hand panel and search "SQF Syntax for brackets"
    3. press install and your done.


    Tips for Beginners:
    if you are new to coding in SQF the first thing id recommend you do. is open up someone elses work. and read and workout how it works. and whenever you see words that you dont understand exactly what it does, this plugin will make it very easy for you to see exactly what it does without looking away from the editor. once you have a basic understanding and also understand how "call" & "spawn" work with passing in paramaters. then you can make ur first function / file. And learn to split your code logic up. so that each file / function performs one task and is named and documented appropiately. which will help greatly when your codebase starts to grow huge and you need to look for whatever does x feature. remember that the first goal is to master the syntax of the language you are using, so you can efficently make whatever it is you want. this takes reading and practice. and make sure to always focus on reading information about the syntax of the language before trying to learn advanced techniques. Bohemia Scripting Wiki.

    After heavily leveraging that website to quickly learn sqf i was up and going in a weekend making heaps of things. i do understand i am a seasoned programmer from multiple languages which is why i thought id make this advanced editor plugin to give back to this pretty awesome community and help those out who are new to learning a programming language. (i wish i had this plugin when i started could of probs learned sqf at a much faster rate, one of the hardest things was realising what their is actually keywords for to do the things i wanted to do).


    Final note:
    Any feedback / error reporting / feature request would be greatly appreciated, ill try and look at the forums as often as i can but i doubt i will super often, so instead please submit a issue / feature on the github page for this project as i check github religiously. also anyone who is experienced javascript programmer who would like to help feel free to contriute to the project as i personally hate using javascript for general computing tasks xD. hope this tool will actually help people in their efforts to make awesome mods for arma3. (i think i might make a post about how workflows are important for productivty when programming(specifically for arma3) let me know if you guys would like that in the comments)

    This post was edited by Big (2014-10-02 07:41, ago)


    Author Message


    Posts: 25
    Rank:


    Level: Member

    Country: us
    Location:
    Occupation:
    Age:
    In-game name:

     
    #2 Posted at 2014-10-04 05:39        
         
    Hi zanven,

    I just installed the plugin and it seems like a great scripting tool! I'll definitely try it out more.

    Just some feedback:

    It would be awesome if it were easier to access BIS documentation for A3 inbuilt functions (e.g with F1 instead of Ctrl+K). Also it would be nice if there were auto-complete and documentation support for the more advanced functions made by BIS ("BIS_fnc_xxxx").

    Also, since .hpp files are already supported, extended support for .ext and .cfg filetypes would be nice as well.

    This is obviously a great tool in the making. Looking forward to it!

    ted_hou


    Advertisement


    Author Message


    Posts: 3
    Rank:


    Level: Member

    Country: au
    Location: Sydney
    Occupation: unemployed (junior game dev c++)
    Age: 24
    In-game name: Zanven

     
    #3 Posted at 2014-10-06 19:32        
         
    hey ted_hou. for the remap of keys i had a bit of a poke around and found a plugin called "Brackets Key Remapper" which lets u remapp any of the keys. i found it very usefull on f1. made my life a bit quicker :).

    As for the BIS_fnc docs i will modify my scraper to try and get something going. the main problem is that some of the functions will have no docs so i need to take that into account into my scrapper so u dont see weird stuff on it.

    thanks for the feedback.

    EDIT: Support for all keywords from. https://community.bistudio.com/wiki/Category:Arma_3:_Functions have been added to current release.

    This post was edited by zanven (2014-10-06 21:10, ago)






    Tags: Code, Editor, Sqf, Text, Tool