Textmate.el for Emacs
Since switching from Textmate to Emacs, the only thing I have missed is âŒ˜T or Go to File. I used it all the time in Textmate and although there were some minor-modes for Emacs that got me closer, it still wasn’t âŒ˜T.
Chris has developed Textmate.el, a minor-mode that brings some of the similar key bindings to Emacs for those of us who relied on Textmate bindings.
From the readme:âŒ˜T – Go to File â‡§âŒ˜T – Go to Symbol âŒ˜L – Go to Line âŒ˜/ – Comment Line (or Selection/Region) âŒ˜] – Shift Right (currently indents region) âŒ˜[ – Shift Left (not yet implemented) âŒ¥âŒ˜] – Align Assignments âŒ¥âŒ˜[ – Indent Line âŒ˜RET – Insert Newline at Line’s End âŒ¥âŒ˜T – Reset File Cache (for Go to File)
A “project” in textmate-mode is determined by the presence of a .git directory. If no .git directory is found in your current directory, textmate-mode will traverse upwards until one (or none) is found. The directory housing the .git directory is presumed to be the project’s root.
In other words, calling Go to File from ~/Projects/fieldrunners/app/views/towers/show.html.erb will use ~/Projects/fieldrunners/ as the root if ~/Projects/fieldrunners/.git exists.
In your emacs config:
(add-to-list ’load-path “~/.emacs.d/vendor/textmate.el”)
Chris’s example above is typical of Rails projects but I can attest to the fact that this works nicely for Python/Django projects.
Gist.el for Emacs
While you’re visiting Chris at Github I recommend you also grab a copy of Gist.el. Gists are like pasties for those who aren’t familiar with the term. What Gist.el does well is paste the buffer or region to your account on github and return the url in your kill-ring, public or private. Gist.el will also allow you to yank a gist into a buffer.