Raised This Month: $89 Target: $400
 22% 

[TUT] Compiling AMXX plugins with Sublime Text


Post New Thread Reply   
 
Thread Tools Display Modes
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-10-2017 , 16:32   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #31

Any chance of getting auto indenting on tabbing ?
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-10-2017 , 20:07   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #32

Quote:
Originally Posted by Depresie View Post
Any chance of getting auto indenting on tabbing ?
How would it be? Every time you hit the tab key, all the file is re-indented?

Currently you can press `Ctrl+Shift+P` and type `Inden` and it will indent for you:
Spoiler

It can be done, just need change the tab key binding. But is not easy to change the tab behavior
because there are lots of settings on it. It is easier to use another shortcut as F1.
Just go to `Preferences -> Key Bindings - User`, and insert this where you like most.
Code:
    { "keys": ["f1"], "command": "reindent", "args": {"single_line": false} },
Example:
Code:
    ...
    { "keys": ["ctrl+k", "ctrl+8"], "command": "stickysearch", "args": {"op" : "set"} },
    { "keys": ["ctrl+shift+8"], "command": "stickysearch", "args": {"op" : "add"} },
    { "keys": ["f1"], "command": "reindent", "args": {"single_line": false} },
    { "keys": ["ctrl+k", "ctrl+7"], "command": "stickysearch", "args": {"op" : "clear"} },
    ...
Quote:
Originally Posted by Depresie View Post
Oh man, really nice work, it is a pleasure to script on this, idk how you got the colors to blend so nice..
I am glad you like. But notice this is the simple version, i.e., less features.
I took the one I use and removed everything from it until it meet what you initially asked.
If you are using the other syntax `amxmodx -> AMXX-Pawn`, the colors are not mine, but from color scheme/syntax Destro did on his version.


Update:

Released a new version:
Code:
v1.3 | 2017-01-10
 * Fixed error message when compiling plugins on the default compiler's folder.
 * Fixed not recognizing all file functions when parsing comments and quotes in chars and strings.
 * Fixed the auto completion not working on non-saved files, i.e., you start writing a new sheet without saving it.
 * Added a new setting `word_autocomplete` to enable auto completing words from the current file.
 * Added a new setting `use_all_autocomplete` to use the package `All Autocomplete` to do the completing on the current file.
 * Added a new setting `function_autocomplete` to enable auto completing functions and global variables from the current file.
On this version I removed the message `Cannot perform a cyclic copy`, which was just a warning from windows.
If you want to remove the other message `1 File(s) copied, to the folder C:\Users\Nick\Desktop\SERVER\cstrike\addons\a mxmodx\plugins`,
I will let you do this on the script, it is pretty simple, click in the menu `Amx Mod X -> Configure Windows/Batch Compiler` and to find the lines:
Code:
File: AmxxPawn.bat
...
91: echo.
92: echo 1 File(s) copied, to the folder %folders_list[0]%
...
109:             "!folders_list[%currentIndex%]!"^|find /v "%PLUGIN_BASE_FILE_NAME%"' ) do echo %%a, to the folder !folders_list[%currentIndex%]!
...
And change them to:
Code:
File: AmxxPawn.bat
...
91: echo. > nul
92: echo 1 File(s) copied, to the folder %folders_list[0]% > nul
...
109:             "!folders_list[%currentIndex%]!"^|find /v "%PLUGIN_BASE_FILE_NAME%"' ) do echo %%a, to the folder !folders_list[%currentIndex%]! > nul
...
Pictures:
Spoiler
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!

Last edited by addons_zz; 02-10-2017 at 20:10.
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-11-2017 , 10:25   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #33

What i meant is when you press Tab, instead of jumping 4 spaces to right, to jump to the next position dividable with 4...

For example, if my variable is written starting from the 6th space and i press tab, it should jump to the 8th space not 10th

Btw, thanks for the update, reinstalling now
__________________

Last edited by Depresie; 02-11-2017 at 10:30.
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-11-2017 , 12:12   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #34

You are welcome. To do it, just enable a setting. To go `Preferences -> User - Settings` and find the line near the end of the file:
Code:
    "use_tab_stops": false,
And change it to:
Code:
    "use_tab_stops": true,
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-11-2017 , 13:04   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #35

Cool thx !
__________________
Depresie is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-11-2017 , 18:49   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #36

Autocompletion is still buggy, sometimes i even have to restart the application after saving the file in order to get it working
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-11-2017 , 19:21   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #37

Yeah, I found out this afternoon what is the bug. It is a misspelling on the file. I did not release it yet because I am fixing other bugs.
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!
addons_zz is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 02-12-2017 , 06:27   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #38

Great, waiting for the next release
__________________
Depresie is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-12-2017 , 19:14   Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
Reply With Quote #39

Release a new version:
Code:
v1.4 | 2017-01-12
 * Fixed misspelling blocking new includes from being processed.
 * Fixed compiler error when try to compile non saved files.
 * Fixed the some `#if defined` parsing forcing to skip all the source code after them.
 * Added support to define function parsing.
For now on this version everything must to be working right/good.
If you see something which still broke, you need to report it again.
__________________
Plugin: Sublime Text Studio , Galileo
Multi-Mod: Manager / Plugin / Server

Help the AlliedModders' website stay online!
addons_zz is offline
Mistrick
Senior Member
Join Date: Aug 2012
Location: Russia
Old 02-13-2017 , 04:23   Re: [TUT] Compiling AMXX plugins with Sublime Text
Reply With Quote #40

private functions don't highlighted.
Mistrick is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:37.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode