Ruby support for LightTable
JavaScript Clojure Ruby
Latest commit ce7c443 Jan 11, 2014 @darthdeus Merge pull request #1 from bitdeli-chef/master
Add a Bitdeli Badge to README
Failed to load latest commit information.
codemirror Add Ruby connector stub Jan 10, 2014
src/lt/plugins Add clear-eval-results + readme update Jan 10, 2014
plugin.edn Initial commit with an actually working command Jan 10, 2014
ruby_compiled.js Add clear-eval-results + readme update Jan 10, 2014
screencast.gif Add gif demo Jan 10, 2014
test.rb Add gif demo Jan 10, 2014

Ruby plugin for Light Table

This is a simple (but soon powerful) Ruby plugin for the Light Table editor.



Make sure you have the rcodetools gem installed (gem install rcodetools) and xmpfilter (executable which comes with rcodetools) is available in your $PATH. This might mean you have to launch Light Table via the light command, instead of running the .app directly (depends on the platform).


As the plugin uses xmpfilter to do the evaluation, it's not yet as powerful as the builtin clojure support. But you can already evaluate Ruby inline by adding # => at the end of the line where you want to see the result, and then run the eval. For example

a = 3 + 4 # =>

puts a

When you invoke the eval the buffer will get replaced with the result

a = 4 + 7 # => 11

puts a
# >> 11

MAKE SURE YOU SAVE THE FILE FIRST, OTHERWISE THE UNSAVED CHANGES WILL GET OVERRIDEN, because xmpfilter reads the contents from the actual file. (TODO - fix this)

You can run the evaluation either by invoking the behavior directly via Ctrl-Space -> Ruby: eval current buffer, or by making a keyboard shortcut (see below). After the eval you can clear the results using Ruby: clear eval results.

:editor.ruby {
  "ctrl-l" [:ruby.eval-buffer]
  "ctrl-shift-l" [:ruby.clear-eval-results]

Shameless self promotion

The initial version of this plugin was developed by the awesome ninja hackers at

Bitdeli Badge