View Single Post
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-13-2017 , 22:00   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #43

You are welcome. Now I do not feel comfortable creating a full package, as Sublime Text is
proprietary software. Also, I do not see how it could be more newbies proof. I already posted
pictures for every single step it is necessary to be done. May be I could include the compiler,
but the newbie would still have to set the folder to their plugin's folder on his game. So, if he
can do that, he can also point the settings file to his compiler and to where the compiler's
include folder is on.

What I cannot help is with lazy people who do not dares to carefully read the instructions and even
see the pictures corresponding. Though, may be a video tutorial teaching how to setup should be
helpful with the laziest ones.

Quote:
Originally Posted by Mistrick View Post
private functions don't highlighted.
After working on it today I found out how to fix this. After I have tried several approaches
I found out a easy way to differ the `private_function_declarion()` from a call to call_to_function()`.

Hopefully, pawn has the error:
Code:
error 055: start of function body without function header
Therefore I only set the syntax to function call inside braces, so everything what is outside
braces are function definitions. However this causes the problem for function's call on functions
without braces, example:
Code:
private_function_declaration()     call_to_function()
On this case, as both are outside braces, they will be colored as function's definition.
Anyways, I believe this should not to be problem for anyone eyes/taste. If they do not like,
just put the damn braces on it:
Code:
private_function_declaration()    { call_to_function() }
Now the other problem, actually even this above problem can be fixed, doing a complete
parse of the file and creating a syntax file dynamically for each file you got open, however
this is very computing expensive, so should just be considered impossible until Sublime Text
provide a more complete native support for the syntaxes we can write to it.

@Mistrick, you can download the syntax I am attaching here and replace your on the folder
`Sublime Text Root/Data/Packages/Amxx Pawn`. I also update the file on the first post within it.
Attached Files
File Type: zip AmxxPawn.sublime-syntax.zip (3.9 KB, 101 views)
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-14-2017 at 07:51.
addons_zz is offline