You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a simple (but soon powerful) Ruby plugin for the Light Table editor.
Installation
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).
Usage
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# =>putsa
When you invoke the eval the buffer will get replaced with the result
a=4 + 7# => 11putsa# >> 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.