Jump to content

Sublime Text 3 - 50p's MTA Editor (package)


50p

Recommended Posts

Loving this so far, will you keep it updated with future versions of MTA?

Also just a sublime question, instead of hitting enter and having the whole Syntax of the function pop up, is there a way to just autocomplete?

Like I'm typing "addCo" have it autocomplete to addCommandHandler?

Thanks again!

Link to comment

@Controlled,

Yes, you can hit TAB and it will auto-complete function name and in addition function parameter names, so you know what arguments function is expecting.

I will keep it up to date but I don't know interval on how often I will run my bot. I'm basically running an application which gets all the function names from the wiki and generates the content I need for Sublime Text. The problem is it has to connect to every function page on the wiki to get all the details, no matter if I already have that function in the package or not. So, that's a killer (bandwidth-wise) for wiki to get requests from my bot for all wiki pages (that's almost 1500 functions, client and server only functions as well as shared functions). MTA team doesn't add new functions every day so that's fine, I can update it from time to time.

Thanks for the comments and questions so far. I'm glad you're all liking it. Questions and suggestions are welcome.

Link to comment
doesn't work for me

Give more details please.

i installed sublime text 3 and when i went to appdata folder etc there wasnt 50p folder so i made one with name just like u said in tutorial and extracted zip in that folder but under syntax theres no choice of mta lua

Link to comment

@John Smith

If you have WinRAR installed then you can put the .zip in C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\ folder and right-click the .zip and choose "Extract to 50pMTAEditor\" then the folder will be created and all the files from .zip file extracted to it. I didn't know it can be so difficult for some people, so in the future I'll have to use Package Control, which is useful plugin and allows easy installation without need to do it manually.

Link to comment
@John Smith

If you have WinRAR installed then you can put the .zip in C:\Users\\AppData\Roaming\Sublime Text 3\Packages\User\ folder and right-click the .zip and choose "Extract to 50pMTAEditor\" then the folder will be created and all the files from .zip file extracted to it. I didn't know it can be so difficult for some people, so in the future I'll have to use Package Control, which is useful plugin and allows easy installation without need to do it manually.

i dont know how but i must have missed the "extract the zip" part in your post,sorry.

nice job with this thing btw

Link to comment

Just wanted to let you guys know, I'm working on a little plugin, the screenshot should say it all:

https://dl.dropboxusercontent.com/u/437 ... plugin.png

If you create a .lua file anywhere in a resource folder (I'm using SideBarEnhancement plugin, I recommend it but it doesn't trigger event when file is created) and when you try to save it, my plugin will check if the file already exists inside the resource meta.xml if not then you will get this message box asking you if you want to add it. The most important thing is that if the file name starts with "c_" then file will be added as client-side script, otherwise server-side; no the file name doesn't have to start with "s_" but for organization purposes I recommend you follow this naming convention. At the moment it's exclusive to Sublime Text 3, I will try to port it to Sublime Text 2. Also, unfortunately Sublime Text doesn't trigger an event when file is renamed so I cannot update meta.xml when you rename a file. I'll will have to create a service or a hidden app that will be ran when Sublime Text starts and it will do that for me.

Don't ask for release date, I will release it soon, very soon.

Link to comment
Just wanted to let you guys know, I'm working on a little plugin, the screenshot should say it all:

Good idea but maybe can you add detection by folder name too? For example if script is in .../client/main.lua plugin will detect it as client-side script.

Link to comment
Just wanted to let you guys know, I'm working on a little plugin, the screenshot should say it all:

Good idea but maybe can you add detection by folder name too? For example if script is in .../client/main.lua plugin will detect it as client-side script.

I will do that. It's good idea since I put my client scripts in "client" sub-folder too.

Just a little update on the progress. I managed to build a plugin that will restart resource. I'll have to make it customizable so users can bind keys to run the plugin (I think the default will be set to Ctrl+B). I might change it so that resource (of which file you're editing) will restart when you save the file. But there is a huge problem.. To make it work, users will have to download and put my resource in their resources folder as well as run it and give it admin rights or at least allow it to call restartResource and startResource functions because that resource will allow Sublime Text to restart resources that users will be editing. I hope it makes sense. If it doesn't, just ask and I'll explain in details how it works.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...