Home Download Buy Blog Forum Support

Mainlining Plugins via SVN externals...

Mainlining Plugins via SVN externals...

Postby willi297 on Wed Jun 16, 2010 1:57 pm

Since Sublime Plugins are a huge part of our use of Sublime in my workplace, and we have several users, I have come up with a shared distribution of Sublime using the portable distribution. Since we use SVN for source control at the company I am currently working at, I have checked in the portable version of Sublime (prior to license activation).

In order to share a common set of plugins that are useful from our perspective (C development via TDD), I utilize SVN externals to make the magic happen. I simply add an 'svn:externals' property to the <Sublime Text Root>/Data/Packages folder for each plugin I want to include in the distribution. The URLs for most of these 'external' packages point directly to the plugin sources in the package repo.

As a result, anyone can get the entire disribution by simply checking out the repo from our local SVN. Furthermore, anyone with commit privileges can add new packages. Also, any user just needs to do an SVN update to get the latest packages by just doing an SVN update.

An example svn:externals property listing is:
Code: Select all
Ceedling http://sublime-text-community-packages.googlecode.com/svn/trunk/Ceedling
ProjectMRU http://sublime-text-community-packages.googlecode.com/svn/trunk/ProjectMRU


I have added an svn:ignore property to this folder as well, in order to avoid collisions with the default packages for Sublime (as follows):
Code: Select all
ASP
ActionScript
Batch File
C#
C++
CSS
Color Scheme - Default
D
Default
Erlang
Graphviz
Groovy
HTML
Haskell
Java
JavaScript
LaTeX
Language - English
Lisp
Lua
Makefile
Markdown
Matlab
OCaml
PHP
Perl
Python
R
Rails
Regular Expressions
Ruby
SQL
Scala
ShellScript
TCL
Text
Textile
Theme - Default
User
XML
YAML


Finally, I added a registry script OpenWithSublimeText.reg to the root of the repo/distribution so that we can get the "Open with Sublime Text" context menu entry in Windows Explorer. Double-clicking on the .reg file adds it to the registry. NOTE: If this script assumes you checkout the distribution into C:\SublimeText.
Code: Select all
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\Shell\Open with Sublime Text]

[HKEY_CLASSES_ROOT\*\Shell\Open with Sublime Text\command]
@="C:\\SublimeText\\sublimetext.exe \"%1\""
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests