4

I'm running msys 1.0 on Win2K using the rxvt.exe terminal. By default, tab-completion works, but when I do 'set -o vi' to enable vi-readline editing, tab-completion stops working. Surely I can have my cake and eat it too?

William Knight
  • 143
  • 1
  • 3

3 Answers3

3

Add this line to your ~/.inputrc:

"\C-i": vi-complete

To enable it in the current session without having to restart it, type this at the Bash prompt:

 bind '"\C-i":vi-complete' 
Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
  • Thanks for the suggestion, but I tried both of these and I still have the same problem. – William Knight Mar 09 '10 at 18:08
  • 1
    But wait! After doing the bind command, I found that if I also unchecked 'Quick-Edit' mode in the options tab of the msys.bat properties, then it worked! thanks! – William Knight Mar 09 '10 at 18:58
1

After searching the mailing list, I added these lines to the top of my .inputrc file:

set editing-mode vi
TAB: complete

This seems to work for me so far.

Brian Neal
  • 113
  • 3
0

Typing

set -o vi

followed by

bind '"\C-i":complete'

seems to give me the behavior I want (tab tab suggestions, and vi editing behavior). This seems strange to me because

"\C-i":complete

is the default in the ~/.inputrc file.

Adding

"\C-i": vi-complete 

to your

~/.inputrc

seems to work but only if there is a single suggestion, and tab tab does not give you a list of suggestions as it did before. Does anyone have a more complete suggestion?

I tried:

$if mode=vi
      # "\C-i": complete
        "\C-i": vi-complete
$endif

But it as no effect if I switch to vi after I start mingw by typing

set -o vi

Of course

bind '"\C-i":vi-complete'

does work, but tab tab does not show all suggestions, and it only auto-completes if there is but a single suggestion.

ggb667
  • 101
  • 3