To make the installation of packages easier you should install something called Package control.
Once it is installed you can easily install other packages. Press CTRL+SHIFT+P to get list of all ST2 commands and write "Install package". The list should reduce to only one command. Press ENTER to select it and after a second or two there should be list of all packages available. You can also visit http://wbond.net/sublime_packages/community to see all packages with description.
I personally like these packages:
- Alignment - Align selected lines according to "=" character with "CTRL+ALT+A" shortcut.
- ZenCoding - Makes writing HTML easier.
- SFTP - Sometimes you might have to access your server with FTP protocol. This is how you can do it in Sublime Text.
Now we have nice and tuned editor. Next thing is to create a project for easy file manipulation. Let's create our config.xml file and save it to newly created folder that will be root of our project. Then go to the menu bar in Sublime Text and select "Project">"Save project as" and save the project to the root directory. After that, you can use "CTRL+P" to quickly open any file in your project - very comfortable.
When you close your project ("Project">"Close project"), work on something else and then you want to work on your project again you can use "Project">"Recent projects" to reopen the project again together with all files you had opened last time.
Let others help you
How to install GIT on Windows and how to use git with Github:
Follow the Github tutorial and create a repo on github and also in our project folder and create the "remote" there, so you can upload your updates. Also use the .gitignore on *.sublime-project and *.sublime-workspace files.
Building OEX files
Even though you can use the config.xml to test the extension you still need to create the oex file time to time. Sublime Text can help you to do this extremely easier. What we need it to do is.
A) Delete old OEX file
B) Create new OEX file which doesn't contain following files:
- all git files
- *.sublime-project & *.sublime-workspace files
- some other folders with "not for extension package" data
You can create "build" files in Sublime Text. Go to "Tools">"Build system">"New build system". New JSON file should open. Replace all with following code:
"cmd": ["del", "$project_base_name.oex", "2>NUL", "&;", "7za", "a", "-tzip", "-xr!*.sublime-*", "-xr!.*", "$project_base_name.oex", "$project_path/*"],
and save it as "Opera Extension.sublime-build".
The code above uses 7zip command line interface to create our OEX file, but because you probably don't have 7zip in your command line you have to get it there first.
Open this archive:
and move the "7za.exe" file to C:/Windows/system32.
Everything should be ready now. Go to any file of you project in Sublime Text, select "Opera Extension" builder in "Tools">"Build system" and press CTRL+B to build the project and create the oex file in your root folder.
Start the name of file or folder with "." to prevent it from being in the OEX file.
And that's all. I hope I helped at least someone.