[TxMt] [TextMate] Help With Ruby Command

Nils Kassube nika at kassube.de
Tue Oct 26 11:10:50 UTC 2004


Am 26.10.2004 um 11:28 schrieb Timothy Martens:

> I mapped it to a key and it moves the selected text/line to "done.txt" 
> Except the task_text.gsub!("\\[ \\] ","[X] ")
> stuff doesn't seem to be working.

In Ruby 1.8 this should be

task_text.gsub(/\[\s*?\]/, '[X]')

The left argument is a RegEx object, not a string.




More information about the textmate mailing list