Jump to content
Sign in to follow this  
jonbons

SQF Syntax Highlighter for Sublime Text 2

Recommended Posts

I use Sublime for a lot of my projects and I always wanted to be able to add syntax highlighting for sqf files, here is a package you can install in Sublime Text 2.

Let me know if you have any problems or if there are errors in the syntax highlighting.

Download/Information:

https://github.com/JonBons/Sublime-SQF-Language

l6sK

Install by running the following command in /Packages

git clone git@github.com:JonBons/Sublime-SQF-Language.git "SQF Language"

Or

Add to the Sublime Package Control repository list. If you have Package Control installed, open Sublime Text and hit CTRL+SHIFT+P and select Package Control: Add Repository and input

https://github.com/JonBons/Sublime-SQF-Language/

You will now be able to install/manage via Package Control.

Link to Sublime Text 2: (Sublime is shareware, you are not forced to pay for it. If you don't pay for it every once in a while a message will pop up asking if you want to buy it, you can just click No.)

http://www.sublimetext.com/2

Edited by JonBons

Share this post


Link to post
Share on other sites

Nice one! Thanks!

Btw, forgot quotes at the end, should be:

git clone git@github.com:JonBons/Sublime-SQF-Language.git "SQF Language"

Also when opening a SQF file, it automatically had detected SQF Language, did not need to set it manually.

Edited by Sickboy

Share this post


Link to post
Share on other sites
Nice one! Thanks!

Btw, forgot quotes at the end, should be:

...

Also when opening a SQF file, it automatically had detected SQF Language, did not need to set it manually.

Thanks, I was unsure if it would automatically select the highlighter due to me testing this all on one machine and I had messed with a bunch of settings. I've updated the readme with the proper command.

Share this post


Link to post
Share on other sites

I've been using ST2 for a while now and I've just randomly typed "SQF.tmLanguage" in Google and found your GitHub repo.

This really made my morning, thanks! :)

Share this post


Link to post
Share on other sites
I've been using ST2 for a while now and I've just randomly typed "SQF.tmLanguage" in Google and found your GitHub repo.

This really made my morning, thanks! :)

Im growing fonder by the minute of ST2 myself as well, great editor.

Thanks to Banshee for putting me on it's trail, and JonBons for the SQF plug!

Share this post


Link to post
Share on other sites

I have pushed a commit that adds support for the OA 1.62 and OA 1.63 commands that were listed on the Bohemia Wiki page.

Share this post


Link to post
Share on other sites

Great! Good highlighting for the most fappable editor ))

Doesn't work highlighting for the hex values, like an 0xA0

Share this post


Link to post
Share on other sites

I updated the highlighter with some missing arithmetic and comparison operators.

Also note that I got a pull request approved to add this language into the official package control repository list. This means on a fresh install of the package control plugin you can search for SQF and find it without needing to add the repository.

Share this post


Link to post
Share on other sites

this is sweet! Exactly what I was looking for, thanks for sharing! I cant imagine a life without Sublime!

Share this post


Link to post
Share on other sites

I'm currently testing adding sqf to the goto-documentation plugin so if you want to try it out here is the instructions.

How to use with Package Control:

  1. Ctrl + Shift + P
  2. Type "add repo"
  3. Click "Package Control: Add Repository"
  4. Paste this link:
    https://github.com/JonBons/sublime-text-2-goto-documentation-sqf



  5. Afterwards just do Install Package and type "sqf"
  6. Then click the package "sublime-text-2-goto-documentation-sqf"

You then need to add the keybind

  1. Preferences -> Key Bindings - User
  2. Add keybind:
    { "keys": ["f1"], "command": "goto_documentation" }


Now you can simply select the text you want to search the BIKI for and then press F1 and it will open a browser window to the BIKI.

  • Like 1

Share this post


Link to post
Share on other sites

Started using this. It's great.

Suggestion: add BIS_fnc_* to "existing" commands

Can you change anything regarding the auto indent? Currently it does this

original:

[] spawn {
waitUntil {time > 0};
player switchMove "amovpercmstpslowwrfldnon";
};

auto-indent:

[] spawn {
waitUntil {time > 0};
player switchMove "amovpercmstpslowwrfldnon";
};

Share this post


Link to post
Share on other sites

Awesome work. I am transitioning from emacs to ST2 for my work and your syntax highlighting gives me a personal reason to enjoy the move.

Share this post


Link to post
Share on other sites

I just got a pull request from a Github staff member to add a license so that they can integrate the highlighter into Github's syntax highlighting so hopefully that will show up soon on GH projects.

I already noted that when searching on Github by language SQF is now an option.

I also did a quick update to add some missing commands that were added before v1.34.

Share this post


Link to post
Share on other sites

I tried to install this on my ubuntu server machine with the newest version of gitlab. Iam getting this error: Permission denied (publickey).
fatal: Could not read from remote repository.
 

What can i do?

 

Thanks!

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
Sign in to follow this  

×