AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [TUT] Compiling AMXX plugins with Sublime Text (https://forums.alliedmods.net/showthread.php?t=293376)

addons_zz 01-30-2017 14:03

[TUT] Compiling AMXX plugins with Sublime Text
 
1 Attachment(s)

[TUT] Compiling AMXX plugins with Sublime Text

Quote:

Originally Posted by Depresie (Post 2488992)
You should really consider making this simple IDE for PC since all we got now is the old bugged AMXX studio and other buggy / over developed IDEs full of crap when all there is needed is
Quote:

Open
Save
Compiler
Highlighting
Light + Dark skin
Output + Compiler path
Search + Replace

Disclaimer:

I did not wrote Sublime Text, or the several of its packages I providing on this setup.
Each package has its own README file stating its author, or at least should.
I just gathered them and put them all together, may be a few bug fixed if necessary
on some of them. See the change log for more details.

The distributed packages by the Data.zip or later downloaded by the AmxxChannel
installer, in addition to each one own license, are distributed under the following conditions for
its usage and installation:
Code:

ALL THE SOFTWARES, PACKAGES, PLUGINS, SETTINGS, DOCUMENTATION, EVERYTHING ELSE, ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Contents' Table
  1. How to install?
  2. How to compile?
  3. The auto-completion
  4. Why Sublime Text?
  5. Change log
  6. What more you can do?
  7. FAQ: Frequently Asked Questions
  8. Downloads

You can have tooltips with your function documentations:

https://i.imgur.com/txvDpry.png


This is how the application looks like. Here I am using the commands:
  1. `Go To` by the keyboard bind `Ctrl+R`
  2. `Build` by the keyboard bind `F7`
  3. `Show Build` by the keyboard bind `F8`
https://i.imgur.com/ebMiY2B.gif


There is also the commands:
  1. `Go To Line` by the keyboard bind `Ctrl+G`
  2. `Go To File` by the keyboard bind `Ctrl+P`
  3. `Command Palette` by the keyboard bind `Ctrl+Shift+P`
https://i.imgur.com/nrEnGxW.gif


You can see the parameter by putting the mouse over the function name and waiting about 2 seconds:

https://i.imgur.com/UHuJU8S.gif



Change log Go to top
Spoiler


How to compile? Go to top
Spoiler


What more you can do? Go to top
Spoiler


Why Sublime Text? Go to top

Because you can customize anything: Key Bindings, Menus, Snippets, Macros, Completions and more, just about everything in Sublime Text is customizable.
  1. For a full featured Sublime Text, read: Versioned Sublime Text Settings
  2. If you do not like to see the message `This is an unregistered copy` every time you open Sublime Text, you need to buy a
    Sublime Text Licence for about $80 dollars.
See also:
  1. http://www.sublimetext.com/3
  2. https://www.sublimetext.com/buy
  3. https://packagecontrol.io/
  4. https://forum.sublimetext.com/
  5. https://github.com/SublimeTextIssues/Core/issues

Downloads Go to top

What do you need?
  1. Download Sublime Text:


  2. And the configuration files Data.zip I created and attached on the `.zip` file at the end of this post, i.e., just below here.

    Note: On the first time you open Sublime Text, you will may see a message like this:

    https://i.imgur.com/Y3oNw6Z.png

    This is just showing up because Package Control just updated something,
    but needs Sublime Text to be restarted before finishing the updates.

Old Versions Downloads
Code:

Packages.zip (604.7  KB, 56 views ) - v1.4.3 | 2017-01-17
Packages.zip (557.5  KB, 22 views ) - v1.5.0 | 2017-06-15
Packages.zip (  1.04 MB, 17 views ) - v1.5.3 | 2017-09-26
Packages.zip (  1.04 MB, 40 views ) - v1.6.0 | 2017-10-25
Data.zip    ( 673.4 KB, 234 views) - v2.0.0 | 2018-07-24
Data.zip    ( 747.5 KB, 69  views) - v3.0.0 | 2018-12-21
Data.zip    ( 1.12  MB, 268 views) - v3.0.1 | 2020-04-26

License

The distributed packages by the Data.zip or later downloaded by the AmxxChannel
installer, in addition to each one own license, are distributed under the following conditions for
its usage and installation:
Code:

ALL THE SOFTWARES, PACKAGES, PLUGINS, SETTINGS, DOCUMENTATION, EVERYTHING ELSE, ARE PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


addons_zz 01-30-2017 14:04

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins
 

How to install? Go to top
Spoiler


The auto-completion by [Destro], Go to top

To use the auto-completion you need to configure your include folder going on the menu:
Code:

Preferences -> Package Settings -> AmxxEditor -> Edit AmxxEditor Autocompletion Settings
And setting the path to your compiler's include folder on the `include_directory` setting value.



FAQ: Frequently Asked Questions Go to top
  1. Quote:

    Originally Posted by iceeedr (Post 2629554)
    Would you have an updated "how to"? I tried installing yesterday, however the application is totally different from the images, probably because of updates ...

    Sublime Text version changed and the new version as a very new theme, also, I updated the colors schemes used, them, the images became pretty different. But the text inside the images still the names, so you should be able to just ignore the colors/theme/fonts and just follow written the text.



  2. Quote:

    Originally Posted by CrazY. (Post 2606261)
    Autocomplete doesn't work with "includes included into other includes".
    AmxxEditor syntax doesn't auto set in include files.

    I am not sure why this is happening, as by default that should be working.

    Anyways, you can force all files with `.inc` extension to open with the correct syntax:

    1. Opening a `.inc` file
    2. And going on the menu `View -> Syntax -> Open all with current extension as... -> Amxmodx -> AmxmodxPawn`



  3. Quote:

    Originally Posted by DruGzOG (Post 2697420)
    How would I go about opening inc files? Checking your first post, I don't have that option

    You can open any `.inc` file the same way you open a `.sma` file. If this is not recognized by your system, you can choose `Open with...` on and choose `sublime_text` as your default program: https://forum.sublimetext.com/t/cant-set-st3-as-default-app-win10-pro/29586



  4. Quote:

    Originally Posted by JocAnis (Post 2697335)
    Did anyone accomplished auto-filling the new file (just like in Amxx studio), is it even possible?

    Yes.

    1. Just go to the menu `Tools -> Packages -> AmxxEditor -> New Plug-in`

    2. Alternatively, you can go to the menu `Preferences -> Packages Settings -> AmxxEditor -> Install AmxxEditor Menu`

    3. Then, you can use the menu `AmxxEditor -> New Plug-in`

Depresie 02-03-2017 06:45

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Thanks for the tutorial, i will try it as soon as i get the chance

Depresie 02-04-2017 18:41

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Ahm, custom includes support ? =\

fysiks 02-04-2017 19:44

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Depresie (Post 2492922)
Ahm, custom includes support ? =\

Put the custom files in the include folder?

addons_zz 02-04-2017 19:55

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
I am not searching for a include folder where the plugin is, and coping it to the folder of your compiler's include folder is.
For now you can manually copy them to yours compiler's folder.

Does it is really necessary?
I can include it on the compilation script later.

Update:

The load seems to be automatic just using the compiler parameter -I/plugin/include/folder
I tested and it works. Latter I will release a update with. Are there some other things you want to include?

Depresie 02-05-2017 08:59

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
I dont understand what you mean...

The include folder is located in the same folder with the compiler...
Funny tho, it doesn't read from my custom incs, but for some reason it has zombie plague natives, wth

addons_zz 02-05-2017 10:41

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Depresie (Post 2493072)
I dont understand what you mean...

Usually there are two include folders, the first one is the compiler's one.
Code:

D:/
└── Game
    └── cstrike
        └── addons
            └─── amxmodx
                └─── scripting
                      └─── amxxpc.exe
                          ├── compiler.exe
                          └── include
                              └── compiler_defeault.inc

The second one could exists or not. If there is one, it would be:
Code:

C:/
└── User
    └── Downloads
        ├── zp_plague_5.sma
        └── include
            └── zp_includes.inc

So, if we run the compiler with the parameter `-I` pointing to the `zp_plague_5.sma` special include folder,
we do not need to copy the include files to the compiler's default include folder. Example:
Code:

D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"C:/User/Downloads/include" "C:/User/Downloads/include/zp_plague_5.sma"
You do not need to copy the includes on `C:/User/Downloads/include` to the folder `D:/Game/cstrike/addons/amxmodx/scripting/include`.

Depresie 02-05-2017 12:04

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Well, for me it seems to read only from the Download folder include..
How do i set it to read and read only includes from the compiler's folder ?

It also auto completes for all the includes even tho they are not defined in the actual script =/

addons_zz 02-05-2017 12:59

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Depresie (Post 2493116)
Well, for me it seems to read only from the Download folder include..
How do i set it to read and read only includes from the compiler's folder ?

If it was not reading from the compiler folder you would get error like:
Code:

fatal error 100: cannot read from file: "amxmodx"
fatal error 100: cannot read from file: "amxmisc"
fatal error 100: cannot read from file: "fun"

The `-I` parameter is an addition only. Will not remove the include folder never. It will only increase the folders it is able to find includes. The command line can be like this:
Code:

D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"C:/User/Downloads/include/" -I"F:/AMXX/include/" -I"D:/User/Downloads/include/" "C:/User/Downloads/include/zp_plague_5.sma"
Assuming your compiler is on `D:/Game/cstrike/addons/amxmodx/scripting/`, doing the include:
Code:

D:/Game/cstrike/addons/amxmodx/scripting/amxxpc.exe -I"D:/Game/cstrike/addons/amxmodx/scripting/include/" -I"C:/User/Downloads/include/" -I"F:/AMXX/include/" -I"D:/User/Downloads/include/" "C:/User/Downloads/include/zp_plague_5.sma"
Would be redundant to include the folder `D:/Game/cstrike/addons/amxmodx/scripting/include/`, as it is added by default, if it exists.

Quote:

Originally Posted by Depresie (Post 2493116)
It also auto completes for all the includes even tho they are not defined in the actual script =/

The auto completion comes from a standard file with all auto completes.
To do auto completion based on the included files, I need to parse the plugin file, detect which includes it uses, and parse the include folder to get their definitions.

I will see if I can get it working here.

Destro- 02-05-2017 15:25

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Good, I thought that such a simple compiler would not have support for multiple directories of include, so never try xd.

addons_zz 02-06-2017 01:38

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Released a new version:
Code:

v1.1.1 | 2017-01-06
 * Moved the amxmodx settings to the user folder.

v1.1 | 2017-02-06
 * Added customs include folder detection and autocompletion.
 * Improved the Notepad++ Default Stylers Theme.

v1.0 | 2017-01-30
 * Initial release.

To update, you need to completely delete your previous/older installation and install it from the first step, otherwise it will not work.
To use the auto-completion you need to configure your include folder going on:
Code:

Amx Mod X -> Edit AMXX-Autocompletion Settings
And setting the path to your compiler's include folder on the `include_directory` setting value.

Pictures:

Mistrick 02-06-2017 11:42

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Only default theme has full highlighting support. My theme is broken in this pack.
What about setting for don't paste function parameters after autocompletion, add only "()".
How turn off vertical line in the middle of the window?

addons_zz 02-06-2017 11:55

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Mistrick (Post 2493380)
Only default theme has full highlighting support. My theme is broken in this pack.

I tried to create full support for both but my syntax definition is too different.
But anyways you can set the syntax compatible with your and other themes.

For other themes, go to the bottom of the screen, and select the syntax:
Code:

Open all with current extension as... -> amxmodx -> AMXX-Pawn
, instead of Amxx Pawn -> AmxxPawn

Pictures:

Quote:

Originally Posted by Mistrick (Post 2493380)
What about setting for don't paste function parameters after autocompletion, add only "()".

I will look in to that, should be simple.


Quote:

Originally Posted by Mistrick (Post 2493380)
How turn off vertical line in the middle of the window?

Go to the menu `Preferences -> Settings - User`, and find the line:
Code:
    "rulers":     [         100     ],
And change it to:
Code:
    "rulers":     [             ],
Or
Code:
    "rulers":     [         100,         120     ],
If you want to add more of them.

Mistrick 02-06-2017 12:07

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Ok, maybe I will create new theme based on your default theme.

Relaxing 02-06-2017 15:34

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
What to do here?
Code:

[WinError 2] The system cannot find the file specified
[cmd: ['sh', 'C:\\Documents and Settings\\Relaxing\\Desktop\\sublime\\Data\\Packages/Amxx Pawn/AmxxPawn.sh', '', '', 'C:\\Documents and Settings\\Relaxing\\Desktop\\sublime\\Data\\Packages', '']]
[dir: C:\Documents and Settings\Relaxing\Desktop\sublime]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem]
[Finished]


addons_zz 02-06-2017 16:04

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Mistrick (Post 2493380)
What about setting for don't paste function parameters after autocompletion, add only "()".

Released a new version. Was this what did you meant to?
Code:

v1.2 | 2017-01-06
 * Added new setting `add_function_parameters` to enable the parameters addition when autocompleting.

Quote:

Originally Posted by Relaxing (Post 2493435)
What to do here?
Code:

[WinError 2] The system cannot find the file specified
[cmd: ['sh', 'C:\\Documents and Settings\\Relaxing\\Desktop\\sublime\\Data\\Packages/Amxx Pawn/AmxxPawn.sh', '', '', 'C:\\Documents and Settings\\Relaxing\\Desktop\\sublime\\Data\\Packages', '']]
[dir: C:\Documents and Settings\Relaxing\Desktop\sublime]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem]
[Finished]


The `cmd: ['sh'` on the start of your command means you are using the Linux compiler instead of the Windows one.
  1. For the first time, click on the menu `Tools -> Build With...` and choose the `AmxxPawn - Build AMXX Plugin (Windows/Bat)`

  2. For the second time, and others, click on the menu `Tools -> Build`.

    Pictures:

Mistrick 02-06-2017 16:54

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by addons_zz (Post 2493447)
Was this what did you meant to?

Yes. Thanks.
Something wrong with register_cvar() in default theme and AmxxPawn syntax. IntelTip PopUp doesn't work and highlighted not like a function. With AMXX-Pawn all fine.

addons_zz 02-06-2017 18:31

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Mistrick (Post 2493460)
Yes. Thanks.

You are welcome.

Quote:

Originally Posted by Mistrick (Post 2493460)
IntelTip PopUp doesn't work

I do not use the IntelTip, as it is only available on builds higher than 3114, which is frequently crashing here.
However, I can install it to see what is going on.

Update:

I just remembered, I disabled by default a setting on the Sublime Text which should be relate to it.
Try to enable this, Go to the menu `Preferences -> Settings - User`, and find the line:
Code:
    "show_definitions": false,
And change it to:
Code:
    "show_definitions": true,
There is also the setting on the `auto-completion` settings.
Code:

Amx Mod X -> Edit AMXX-Autocompletion Settings

...
    "enable_inteltip": false,

Pictures:

Quote:

Originally Posted by Mistrick (Post 2493460)
highlighted not like a function.

I quite do not get what this means, could you show some screenshots?
I tested it here and it seems file with the default theme and the `Mistrick` Theme. Follow the screenshots:
  1. On this first I am showing the Go to command, I implemented over the `register_cvar`, could be related to it the problem.
    When you do the Go to, it goes to the cvar on configuration file, if it exists and is correctly set to the cfg syntax I ship out with this settings.

    http://i.imgur.com/6tfPn56.png

  2. http://i.imgur.com/T7Jozwi.png

Mistrick 02-06-2017 19:12

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by addons_zz (Post 2493496)
I quite do not get what this means, could you show some screenshots?

Wrong detection with AmxxPawn syntax.

addons_zz 02-06-2017 21:57

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Mistrick (Post 2493507)
Wrong detection with AmxxPawn syntax.

Thanks, I forgot to capture these other cases when I build the `register_cvar` scopes.
Until now I only had been doing:
Code:
register_cvar( "gal_srv_start", "0" );
But not:
Code:
register_cvar( cvar_name_string, "0" );

Therefore, Released a new version:
Code:

v1.2.1 | 2017-01-07
 * Fixed the `register_cvar` not being recognized at some cases on the AmxxPawn.sublime-syntax


Depresie 02-07-2017 03:36

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Very cool addons, i will try out the new version tonight :D

Depresie 02-07-2017 08:00

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Everything seems fine except for the following

If the file is not saved (i.e you start writing a new sheet without saving it ) the auto completion won't work

Also, could you please remove this message ?
Quote:

"1 File(s) copied, to the folder C:\Users\Nick\Desktop\SERVER\cstrike\addons\a mxmodx\plugins
Cannot perform a cyclic copy"
I'll get now back on scripting ^_^

P.S : You forgot highlighting for var/function tags ( public / const / new )

addons_zz 02-08-2017 02:13

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Depresie (Post 2493626)
Also, could you please remove this message ?
Quote:

1 File(s) copied, to the folder C:\Users\Nick\Desktop\SERVER\cstrike\addons\a mxmodx\plugins
Cannot perform a cyclic copy"

Both messages or just the last one `Cannot perform a cyclic copy`?

Quote:

Originally Posted by Depresie (Post 2493626)
P.S : You forgot highlighting for var/function tags ( public / const / new )

I do not understand what it means. Can you show some screenshots?
  1. Code:
    public runTheServerMapCrashSearch() {     new modeFlagFilePath[ MAX_FILE_PATH_LENGHT ];     formatex( modeFlagFilePath, charsmax( modeFlagFilePath ), "%s/%s", g_dataDirPath, TO_STOP_THE_CRASH_SEARCH );
  2. http://i.imgur.com/tMmjRfi.png

  3. http://i.imgur.com/4ZiiISZ.png

Depresie 02-08-2017 12:57

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
I think both messages should be deleted, they are just waste of space in the output window
Strange, for me all the tags except Float are written with default font color on all the dark themes

Oh, and btw, i love the color schemes, they are so good, i really think that you should go further with this, like maybe making it an official IDE for amxx, replacing the old amxmodx studio...

addons_zz 02-08-2017 13:01

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
What color scheme you are using?
Can you provide some screenshots so I can understand what is going on?

Depresie 02-08-2017 13:11

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
It is happening for all the dark themes ( atomic / dark / mistrick / twlight )

http://imgur.com/a/jSUOS

addons_zz 02-08-2017 13:14

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
No need for It, I found the problem. You need to change the syntax to one compatible.

Code:

Open all with current extension as... -> amxmodx -> AMXX-Pawn
, instead of Amxx Pawn -> AmxxPawn

Pictures:

Depresie 02-08-2017 13:19

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Yep, it solved the problem, thanks :D
I will continue exploring the IDE while scripting and come with issues/suggestions

Oh man, really nice work, it is a pleasure to script on this, idk how you got the colors to blend so nice..

Depresie 02-09-2017 10:43

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Any chance to disable the features which sends the text automatically to the next row if the line is too long ?

http://imgur.com/a/gXVqy

Nvm, found the solution, View -> Word Wrap

Depresie 02-10-2017 16:32

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Any chance of getting auto indenting on tabbing ? :)

addons_zz 02-10-2017 20:07

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Quote:

Originally Posted by Depresie (Post 2494436)
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:

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 (Post 2493904)
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:

Depresie 02-11-2017 10:25

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
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

addons_zz 02-11-2017 12:12

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
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,

Depresie 02-11-2017 13:04

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Cool thx ! :D

Depresie 02-11-2017 18:49

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Autocompletion is still buggy, sometimes i even have to restart the application after saving the file in order to get it working

addons_zz 02-11-2017 19:21

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
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.

Depresie 02-12-2017 06:27

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
Great, waiting for the next release :D

addons_zz 02-12-2017 19:14

Re: [TUT] How to setup a simple IDE to program/compile AMXX plugins (with Sublime Tex
 
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.

Mistrick 02-13-2017 04:23

Re: [TUT] Compiling AMXX plugins with Sublime Text
 
private functions don't highlighted.
https://i.imgur.com/95t6uXE.png


All times are GMT -4. The time now is 23:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.