edlin by shinh

alias:u:puts;def p(l=L,i=L,s=$*[l])u"%8d:#{l==i ?:*:' '}"%l+s end;g=proc{gets;u /n/?'O.K.? n':"*#$_";L=eval$&if/\d+/};L=1;u"New file";loop{g[];/q/?~u("Abort edit (Y/N)? y"):/i/?($*[-1+L+=1,0]=$_ until p(L,L,gets)||/Z/):/l/?(p 1;p 2;p 3;p 4):/S/?(5.times{|i|g[p i%3*i/4+2,1+i*i%7]};u"Not found"):/d/?$*.shift: (p;$*[L]=gets;p)}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page