Shannon Smith
Shannon Smith

Reputation: 81

Conditional color scheme in Sublime Text 2

In my workflow, I manage two sets of code per website project. One is for live code and the other is for code which is still being staged.

I would like for live files & staging files to be styled by different color schemes so that I can easily differentiate them.

Is there a way to change the color scheme in Sublime Text based on a file's directory path?


For example:

Upvotes: 5

Views: 128

Answers (1)

Enteleform
Enteleform

Reputation: 3823

I wrote a simple plugin that met your initial requirements and then ended up adding a few extra features since it could be useful to others as a release.


The plugin utilizes RegEx to allow matching of:

  • FileNames ( full & partial )
  • Extensions
  • Parent Directories
  • SubDirectory Structures

Some Examples:

Path

FileName


Get the plugin:

@ PackageControl

@ GitHub

Upvotes: 1

Related Questions