Hi Daniel,

Daniel Tam <danooo....@gmail.com> writes:

> I've activated readline support for the Guile repl, but I've found that
> if my inputrc enables vi-mode, then the bouncing parentheses feature
> doesn't work. Disabling vi-mode does the trick.

Indeed.  For some reason that I cannot determine, the bouncing
parentheses feature is specifically disabled when the vi keymap is in
use.  The relevant function is 'init_bouncing_parens' in
guile-readline/readline.c:

  static void
  init_bouncing_parens ()
  {
    if (strncmp (rl_get_keymap_name (rl_get_keymap ()), "vi", 2))
      {
        rl_bind_key (')', match_paren);
        rl_bind_key (']', match_paren);
        rl_bind_key ('}', match_paren);
      }
  }

This is ancient code, predating version control, present in the original
import into CVS in 1999.

I looked at the source code of readline-7.0, and IIUC none of those keys
have mappings in the default vi keymap.

The right fix might be to simply remove the 'if' check above.  Would you
like to try it and report back?

      Thanks,
        Mark



Reply via email to