The Accidental Rubyist

invalid byte sequence in UTF-8

rbcurse gets vim keys here and there

leave a comment »

Now `Textviews`, `Listboxes` have vim like keys and one can easily map double key combinations to methods.
I’ve included some of this in the demo examples/rfe.rb (ruby 2-pane file explorer).
Also, these widgets can take a number preceding motion commands, so you can do “12j”, “33l”, or “10” arrow-key/C-n etc. “gg” takes to top.
This is just for starters.

The problem in `Textarea` is that since it is _editable_, i don’t know how to specify a “multiplier” (numeric argument). I looked up emacs which uses 2 styles: C-u followed by a number. Or M-number. Have to think about this.

Curently, listboxes jump to the first (or next) element when an alphanumeric key is pressed. Experimentally, to get into vim mode, one may press M-v (alt-v). Now f (char) takes you to the file starting with (char) . So not much functionality lost. Now, gg, G, j, k, dd, etc work, along with multipliers.


Written by totalrecall

February 24, 2010 at 9:04 pm

Posted in rbcurse

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: