This is a TextMate bundle for the excellent Lyndon.
-
Get MacRuby,
-
Get Lyndon. Do so with rip:
rip install git://github.com/defunkt/lyndon.git
Or rubygems:
[sudo] macgem install lyndon
-
Install Lyndon.tmbundle:
git clone git://github.com/mislav/Lyndon.tmbundle.git \ "~/Library/Application Support/TextMate/Bundles"
-
Maximum awesome.
Shortcuts are the same as equivalents in Ruby documents:
- ⌘R -- run JavaScript document
- ⌃⇧E -- run line / selection as JavaScript
(Make sure you have your textmate document set to "JavaScript".)
Here's a sample document:
function camelize(string){
return string.replace(/-(.)/g, function(_, c){ return c.toUpperCase() })
}
camelize('webkit-border-radius')
Hitting ⌘R should produce:
"WebkitBorderRadius"
You're done.