PAWN for Sublime Text 2 & 3
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 1:
Image 2:
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"
}
]
}
Alles anzeigen
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):
Unter Sublime Text 3 geht ihr auf Preferences -> Key Bindings - User und tragt dort den Code von oben ein Ist nämlich kein Settings file vorhanden ind Sublime Text 3
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...
Quelle : Samp.com ( Google Cache regelt in dem Fall. Alle Bildangaben ebenfalls bei Google Cache und Samp.com !