Projects

Project Format

Projects are stored on disk as XML files. Within a project, mount points are defined, each corresponding to a directory included in the project. An example is:

<project>
    <mount name="source" dir="src/impl"/>
    <mount dir="docs"/>
</project>

The above projects consists of two mount points, one for source code and one for documentation. The first has been given a name, so when Open File in Project is used, it'll appear as source rather impl.

Apart from dir and name, the other per-mount point attributes are:

  • include. If specified, only files matching the given pattern will be included.
  • exclude. If specified, files matching the pattern will be excluded
  • dirinclude. If specified, only sub directories matching the given pattern will be included.
  • direxclude. If specified, sub directories matching the pattern will be excluded

Patterns above are simple wildcard patterns (* and ? are supported), separated by commas. For example:

<project>
    <mount name="source" dir="src/impl" include="*.h,*.cpp" direxclude=".svn"/>
    <mount dir="docs"/>
</project>

The above project has had the source mount point modified to include include .h and .cpp files, but not within the .svn directory.

Ad-hoc Projects

Directories may be used as ad-hoc projects: simply drag a directory onto the Sublime Text window from Explorer, or use the Project/Open Directory menu item.

Project Preferences

These General Preferences control the defaults used for projects:

  • project.direxclude: Default value for the direxclude attribute on mount points.
  • project.exclude: Default value for the exclude attribute on mount points.
  • project.buildFile: Default value for the projects build system.