Skip to content
/ live Public

Live is like irb only it is meant to be used from a text editor

Notifications You must be signed in to change notification settings

maca/live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live

Live is like irb only it is meant to be used from a text editor, it essentially polls a *nix pipe and evaluates its contents. It was devised for audiovisual livecoding (ruby-processing and scruby), a block can be bound to a key and can be called later by a keystroke.

Install

$ [sudo] gem install live

Usage

$ live

open a new terminal

$ echo ' "hello" ' > /tmp/live-rb

You will see the code evaluated in the first terminal

$ echo 'bind_key(:a){ "key a was pressed" }' > /tmp/live-rb

When you press the key ‘a’ with focus on the first terminal it will call the block

Vim

To use from vim paste this in your .vimrc file

function EvalLiveRuby() range
  let text = [join(getline(a:firstline, a:lastline), ';')]
  return writefile(text, '/tmp/live-rb')
endfunction

map <Leader>x :call EvalLiveRuby()<enter>

Then by pressing leader and x you will execute the range in the live session

About

Live is like irb only it is meant to be used from a text editor

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages