[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vim like completion in bash?



On Sun, Mar 04, 2007 at 06:54:45PM EST, Steve Lamb wrote:
> Wayne Topa wrote:
> > zhengquan zhang(zhang.zhengquan.mailinglist@gmail.com) is reported to have said:
> >> Hello:
> >> I can :e *doc* in vim, pressing tab and it can help me find the document I
> >> need,
> >> but in bash if I use vi *doc* and press tab, nothing would happen, it can
> >> not find the file I want to edit
> >> Is there any switches to make it possible?
> >> Thank you.
> 
> >> zhang
> 
> > I am running testing with vim 7.0-122+1. 
> 
> > ls WiFi
> > ./  ../  Dlink_DWL-G520  Linksys_wireless  Lucent-WavLan-Gold
> > MAC_addr  Netgear_WPN311
> 
> > vim WiFi/WA<tab>
> > yields
> > vim WiFi/MAC_addr
> 
>     But that's not what he's asking for.  He's asking for *foo*, note the
> double stars.  So a better example would be:
> 
> vim WiFi/*Wav* <Tab>
> 
>     turning into...
> 
> vim WiFi/Lucent-WavLan-Gold

$ mkdir ss
$ touch ss/tt ss/uu
$ vim ss/*t* + <TAB>       /* results in  */
$ vim ss/tt

$ rm -rf ss                

.. and as everybody will no doubt have noticed, ss/tt is one keystroke
less than ss/*t* (not to mention the fact that the '*' is shifted and a
little harder to reach).

Thanks,
cga



Reply to: