Nit K. wrote:
Michael F. wrote:
On Tue, Nov 11, 2008 at 12:28 AM, Nit K. [email protected]
wrote:
I fixed that just today, check it out
easy count prefix via count_map: 10j, 200b, 20%, 42g, 7up, ... · manveru/ver@9fb04aa · GitHub^ manveru
I’ve only integrated the count_map as yet.
Absolutely brilliant. Works like a dream
manver,
macros were not working for me. Are they working with you?
I traced it down to the line in keymap.rb
@keys << Key.new(*args, &block)
where the key was created but not getting inserted into @keys.
Finally, I found that key assignments, when inspected, show “e” (for key
e), whereas a macro for e will show [“e”].
So i tried flattening and its worked out. Don’t know the impact of this,
though.
def map(*args, &block)
if block_given?
args.flatten! @keys << Key.new(args, &block)
else
self[*args]
end
end
btw, the sample vi.rb that you gave has the count_map lines for up and
down mapped incorrectly (up is mapped to down, and vice-versa)
Thanks.