
File status is used to add badges to file icons and to show deleted items as ghost items in the file browser, which allow selecting such items before using Bundles → SCM → Commit ( ⌘Y) or Bundles → SCM → Revert… ( ⌘Y). TextMate also asks the version control system for file status. The variable is mostly useful for decorating the window title. For example if the version control system reports that the current branch is master then the TM_SCM_BRANCH variable will be set to master and will be part of the current scope. TextMate asks the version control system for a few values, which are exposed both as dynamic variables of the form TM_SCM_«variable» and as attr.scm.«variable».«value» attribute scopes. If no variable is set, TextMate will try to find the shell command via the search path. This is to allow the proper bundle to be active, for example the actions in the Git bundle has a scope selector of so that they only show under Bundles → SCM ( ⌘Y) when TextMate has detected, that git is used as version control system.įor Git, Mercurial, and Subversion, TextMate will call out to the appropriate shell command which, for each of the respective version control systems, can be set as the following variables: TM_GIT, TM_HG, and TM_SVN. When detected, it will add attr.scm.«system» as an attribute scope. TextMate will detect when a project is using Git, Mercurial, Subversion, or Perforce.
