23.06.2013, 23:12
(
Последний раз редактировалось Macluawn; 04.07.2015 в 16:47.
)
EDIT: Southclaw's work is more complete, I suggest using that.
Description
This adds syntax highlighter for pawn language (.pwn and .inc files) and samp function and define auto completion.
Files
Download the neccessarry files. Setup
Image 2:
Image 3:
Compiling
This was written by Conroy (source).
Open up Sublime Text 2 and go to Tools -> Build System -> New Build System...
Use the following build code:
Build code provided by user Misuir. (source, github)
Of course you need to replace the path
Save this file and close Sublime Text 2
Now navigate to AppData/Roaming/Sublime Text 2/Packages/User
Open up the .sublime-keymap file based on your operating system
Enter the following (this example is for the Windows file):
You can change f5 to another key if you wish
Save and reopen Sublime Text 2
Now go to Tools -> Build System
Click on the name of the build you created
You can now compile your scripts by pressing the button you assigned, enjoy...
Additional Notes
If you witness any bugs, please let me know by replying in this topic.
Description
This adds syntax highlighter for pawn language (.pwn and .inc files) and samp function and define auto completion.
Files
Download the neccessarry files. Setup
- Download sublime text 2 (skip this step if you already have it)
- Open user package folder by going to Sublime text 2 -> Preferences -> Browse Packages... -> User (see images 1 and 2)
- Drop the just downloaded files into User folder.
- Restart Sublime Text 2.
- In case it doesnt automatically detect .pwn files, go to Sublime text 2 -> View - Syntax - Pawn (see image 3)
Image 2:
Image 3:
Compiling
This was written by Conroy (source).
Open up Sublime Text 2 and go to Tools -> Build System -> New Build System...
Use the following build code:
Код:
{ "cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+"], "working_dir": "${file_path}", "file_regex": "^([^\\.]+\\.pwn)\\((\\d+)\\)() : (.*)$", "variants": [ { "cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+", "-l"], "working_dir": "${file_path}", "name": "Preprocessed output" }, { "cmd": ["${project_path:${folder}}/pawno/pawncc.exe", "$file_name", "-;+", "-v2", "-d3", "-\\)+", "-a"], "working_dir": "${file_path}", "name": "P-code output" } ] }
Of course you need to replace the path
Save this file and close Sublime Text 2
Now navigate to AppData/Roaming/Sublime Text 2/Packages/User
Open up the .sublime-keymap file based on your operating system
Enter the following (this example is for the Windows file):
Код:
[ { "keys": ["f5"], "command": "build" } ]
Save and reopen Sublime Text 2
Now go to Tools -> Build System
Click on the name of the build you created
You can now compile your scripts by pressing the button you assigned, enjoy...
Additional Notes
If you witness any bugs, please let me know by replying in this topic.