From: Michael Fellinger Date: 2008-11-11T01:20:53+09:00 Subject: Re: Roguelike project? On Tue, Nov 11, 2008 at 12:28 AM, Nit Khair wrote: > Michael Fellinger wrote: >> On Mon, Nov 10, 2008 at 4:57 AM, Nit Khair >> wrote: >>> let is not a method is was map. and map should be key. >>> Not sure if my corrections are correct, they are based on vi.rb. >> >> Pull from the repo, there have been major changes and improvments to >> VER. > > manver. > I integrated your example into one of my programs. (Works fine. Changed > VER.stopping and VER.info the @focus.stopping and view.info.) > > I was trying out the n-action feature: e.g 3j 10j etc. > It works fine for single digits but when i try double digits, i get: > No mapping for ["1", "2"]. > I tried combinations such as : > >> map([/^(\d\d?)$/, 'k']){ @arg.to_i.times {view.up}} >> or \d+ etc. > > But apparently the stack reads one digit, and goes into ready(). > > 1. I just want to check if multiple digits work with you, am i doing > something wrong. Yeah, it has to be: map([/^\d$/, /^\d$/, 'k']){ @args.join.to_i.times{ view.up }} which is a PITA, so i made a shortcut for it, see below > 2. I would like to know if you modify or improve/debug this further. Is > there some list or webpage for "ver"? I fixed that just today, check it out :) http://github.com/manveru/ver/commit/9fb04aa943e03850c19b0352b519d885826e7f44 ^ manveru