Skip to content
Script to convert a textmate (or SublimeText) tmTheme to Emacs deftheme
Emacs Lisp Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Fix light / dark theme automatic colors Jun 28, 2014
generatedThemes Enable a ST3/TM theme scope to map to multiple emacs faces Jun 29, 2014
lib Bump to 0.2.1 Jun 29, 2014
sampleThemes Fix bug with 3 digit hex colors Jun 28, 2014
spec Converted to rubygem Jun 27, 2014
templates change template to .erb.el file extension Jun 29, 2014
.gitignore Converted to rubygem Jun 27, 2014
Gemfile Converted to rubygem Jun 27, 2014
LICENSE fixup initial Jun 26, 2014 Added notes to README Jun 28, 2014
install-generated-themes.el Fix typo in install-generated-themes.el - note to self, wear your gla… Jun 28, 2014
slides.gif Update README, add slideshow Jun 28, 2014 Bump to 0.1.9 Jun 28, 2014
tm2deftheme.gemspec Move scope to faces map to data folder, update gemspec Jun 28, 2014


Convert TextMate/SublimeText .tmTheme to Emacs 24 deftheme .el


gem install tm2deftheme


tm2deftheme [options] [themefile.tmTheme]


    -f         ouput Emacs 24 deftheme to file
               e.g. Birds of Paradise.tmTheme



    -s         when used with -f silence output
    -o         when used with -f overwrite existing file

    --debug    debugging output

When run without options converted theme is sent to STDOUT


Note that Emacs syntax highlighting is managed differently to SublimeText / TextMate. Various Emacs modes provide additional highlighing support, but tm2deftheme (currently) only maps to core font-lock faces. So while things won't look like a one-to-one copy, the results are still pretty good.

Linum, fringe and modeline colours are derived from the base foreground and background colors. Support for Rainbow Delimiters is provided automatically.

The imported foreground colors which constrast most from the background are averaged, from this average colour, 9 tint colors are generated and assigned to the rainbow-delimiters-depth-n-face collection.

I'll be adding additional support for js3-mode, git-gutter, flyspell, flymake, flycheck, isearch and more.


See for yourself, here's a handful of converted themes, shown in their original format (here rendered by the excellent and then shown in Emacs 24 after conversion.


Ruby 1.9 or later required.

Development, clone and run bundle install in the project folder.

Contribution / Development

If you'd like to contribute, the best place to do so is in mapping SublimeText / TextMate scopes to Emacs faces. Although any issue posting, bug fixing, feature pull-requests, etc. are welcome.

Avoid using and install-generated-themes.el, they're not tuned for general use.

PLEASE NOTE: will forceably remove all folders matching ~/.emacs.d/elpa/*-theme-140*.

You can’t perform that action at this time.