This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

SourcePawn Syntax Highlighting for Sublime Text 2


Post New Thread Reply   
 
Thread Tools Display Modes
MPQC
SourceMod Donor
Join Date: Dec 2011
Old 01-31-2013 , 21:48   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #61

The gif tutorial is absolutely horrid so I figured I'd type it out so others don't need to follow it.

1) Load up Sublime Text 2

2) Push Ctrl-`, and paste in the following:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.markedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(u rllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2 .urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'

3) Restart Sublime Text 2

4) Download Sourcepawn.sublime.package

5) In Sublime Text 2, at the top click on Preferences - Browse Packages. Go back one folder, then click on "Installed Packages" My path for this is "\AppData\Roaming\Sublime Text 2\Installed Packages" just for reference.

6) Restart Sublime Text 2

7) Load up "\AppData\Roaming\Sublime Text 2\Packages\SourcePawn\SourcePawn.sublime-build"

Add in your preferences. For example, my final file looks like this:

Code:
{
    "cmd": ["D:/sourcemod/addons/sourcemod/scripting/spcomp", "-iD:/sourcemod/addons/sourcemod/scripting/include", "-o$file_path/$file_base_name.smx", "$file"],
    "selector": "source.sp"
}
9) You're done. Load up any .sp file and compile it, see if it works.

10) (OPTIONAL) If you're like me and dislike that the text is normally green instead of white, load up "Tubnil.tmTheme" (same path as before). Under "selectionForeground" change the string to #FFFFFF to make it all white.

__________________

Last edited by MPQC; 02-02-2013 at 17:37.
MPQC is offline
Martin2447
Junior Member
Join Date: Feb 2013
Old 03-08-2013 , 19:37   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #62

I can't change my color scheme/theme? The scheme/theme is just a dark one, but when i go to another doc. than a .sp, it's the Nexus theme? Please Help!
Martin2447 is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-08-2013 , 20:21   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #63

LMAO im obv blind...

Last edited by Doc-Holiday; 03-08-2013 at 23:31.
Doc-Holiday is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-08-2013 , 21:42   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #64

Quote:
Originally Posted by Conic View Post
Oooh, this looks like a much better editor than Notepad++. And it's dark too! I think I'll give this Sublime Text a download.
404UserNotFound is offline
smast
AlliedModders Donor
Join Date: Aug 2012
Old 03-09-2013 , 07:13   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #65

There are no arguments included or i'm doing something wrong?
Attached Thumbnails
Click image for larger version

Name:	args.png
Views:	339
Size:	12.0 KB
ID:	116893  
smast is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 03-09-2013 , 07:20   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #66

Press enter when a suggestion appear than a argument list is coming ;)

But the description of a native would be very nice!
__________________
dordnung is offline
ppalex
Senior Member
Join Date: Nov 2012
Location: Russia, near the Moscow
Old 03-09-2013 , 16:52   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #67

Quote:
Originally Posted by smast View Post
There are no arguments included or i'm doing something wrong?
Just press enter, and you get
Quote:
HookEvent(const String:name[], EventHook:callback, EventHookMode:mode=EventHookMode_Post)
__________________
ppalex is offline
ppalex
Senior Member
Join Date: Nov 2012
Location: Russia, near the Moscow
Old 03-09-2013 , 16:52   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #68

Is anyone interested of version to Sublime Text 3?
__________________
ppalex is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-09-2013 , 18:54   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #69

Quote:
Originally Posted by ppalex View Post
Is anyone interested of version to Sublime Text 3?
Sure! You plan on making it for ST3?
404UserNotFound is offline
fuxx
SourceMod Donor
Join Date: Mar 2013
Location: Munich
Old 03-12-2013 , 18:07   Re: SourcePawn Syntax Highlighting for Sublime Text 2
Reply With Quote #70

Wow!

Great work! I had installed your plugin yesterday. It took some time to got get everything working for und OS X, but finally i can work with it.

Support for 3.x is very welcomed!

Thank you!
fuxx is offline
Send a message via Skype™ to fuxx
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 11:10.


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