In my hudson ci demo at the Brisbane ruby group on Monday night I used a
textmate command that sends the current line or selected text to a gnu
screen session.

I use it in presentations to avoid forcing everyone to sit there watching my
inability to type. It's usually much cooler than anything I then go on to
present.   It's a kind of awkward textmate equivalent of emacs SLIME.

To start, just run 'screen -S screen1' in a terminal.

I just have two commands assocated with command-shift-1 and command-shift-2
that send to 'screen1' and 'screen2' sessions respectively:

#!/opt/local/bin/ruby -wKU
require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
selected_text = (ENV['TM_SELECTED_TEXT'] || ENV['TM_CURRENT_LINE']) + "\n"
system "screen -S screen1 -X stuff #{e_sh(selected_text)}"

I originally stole the code from here -
http://github.com/mocoso/screen.tmbundle - that seemed more complicated than
what I wanted and didn't append a new line to the selected_text.

I've also seen something similar for vim - there seems to be an exodus away
from textmate at the moment.

Mark.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to rails-ocea...@googlegroups.com.
To unsubscribe from this group, send email to 
rails-oceania+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to