Raised This Month: $51 Target: $400
 12% 

SourcePawn Syntax Highlighting for Sublime Text 2


Post New Thread Reply   
 
Thread Tools Display Modes
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 01-20-2013 , 07:11   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #41

Working great on OS X alongside mcpan's code Snaph. Indeed the only thing I'm missing is completion for the .sp file itself.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Snaph
Junior Member
Join Date: Jan 2013
Old 01-20-2013 , 09:09   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #42

Quote:
Originally Posted by mcpan313 View Post
Thanks, you made our life easier!

st2generator.sp up to v1.0.0.3.
  • Add syntax highlighting
  • Add build system for sourcepawn
  • Add define/enum auto-completion

https://forums.alliedmods.net/showpo...6&postcount=19
You should add

Code:
"file_regex": "(.*)\\((\\d+)\\) :"
to your build system. This regexes out the file name and line number so you can jump to errors.
Snaph is offline
Snaph
Junior Member
Join Date: Jan 2013
Old 01-20-2013 , 12:33   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #43

Quote:
Originally Posted by DJ Tsunami View Post
Working great on OS X alongside mcpan's code Snaph. Indeed the only thing I'm missing is completion for the .sp file itself.
I'm working on that now. The first version of it will just give you every variable declared anywhere in the file. That should be good enough for now.

There are some other things I want to add before finding a way to only display completions relevant to the current scope.
Snaph is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-20-2013 , 12:37   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #44

Quote:
Create an SPCompltions.sublime-settings file in your User directory that looks like:
Snaph, what exactly is the "User directory" ? this is very unclear to me, thanks.

Edit: Ok, I've found it, it's under %APPDATA%\Sublime Text 2\Packages\User.

Auto completion is working, wooh good job.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 01-20-2013 at 12:40.
berni is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 01-20-2013 , 12:48   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #45

Quote:
Originally Posted by Snaph View Post
I'm ready to say that my plugin is in a usable state now. It now updates while you are editing as long as you stop typing for 1 second (configurable). I also fixed a bunch of bugs that made it near useless before.

Pick it up from my Github and give it a try (because I need bug testers ) There should be no issue running it alongside mcpan's code. If you do that, you should get the syntax hilighting and build system from his package and the completions from mine.

I will add mcpan's enum parsing code into the next version. After that I will work on adding to the parser so it can generate completions from the .sp file.
any chance you could make it case-insensitive or make an option to add the functions with uppercase start letter instead? i find it useless if i have to start the function with lowercase letter as im not used to it and i really dont want to depend on intellisense so much

btw thanks for your great work its really appreciated
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-20-2013 , 13:21   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #46

mcpan313: Your animated .gif installation guide is somewhat unusable.
Too fast, you can't pause it and you can't copy text...
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Snaph
Junior Member
Join Date: Jan 2013
Old 01-20-2013 , 14:29   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #47

Quote:
Originally Posted by Zephyrus View Post
any chance you could make it case-insensitive or make an option to add the functions with uppercase start letter instead? i find it useless if i have to start the function with lowercase letter as im not used to it and i really dont want to depend on intellisense so much

btw thanks for your great work its really appreciated
I'm not sure what you mean. What is forcing you to type lowercase characters? All of the functions are added exactly as they are in the include files.
Snaph is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 01-20-2013 , 15:37   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #48

Quote:
Originally Posted by Snaph View Post
I'm not sure what you mean. What is forcing you to type lowercase characters? All of the functions are added exactly as they are in the include files.
try to write Get and it wont even show the autocompletion popup, type g and it will show a lot of functions
__________________
Taking private C++/PHP/SourcePawn requests, PM me.
Zephyrus is offline
Snaph
Junior Member
Join Date: Jan 2013
Old 01-20-2013 , 17:28   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #49

Quote:
Originally Posted by Zephyrus View Post
try to write Get and it wont even show the autocompletion popup, type g and it will show a lot of functions
You must have changed something in the Sublime configuration. The completion filter is not case sensitive.
Snaph is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 01-20-2013 , 17:34   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #50

Quote:
Originally Posted by Zephyrus View Post
try to write Get and it wont even show the autocompletion popup, type g and it will show a lot of functions
You still have the old version.
Make sure you configure this correctly and uninstall the version that gets generated by the Sourcemod plugin version.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
Reply



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 19:33.


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