Hi Tony, The requirement of a "common left-hand part" for <tab> to be able to auto-complete words seems too **strict** for me. The reason is that: when I typed ":b u" and pressed <tab>, it is hoped to SMARTLY autocomplete the words up to ":b usa"(since this is common part between 'usa1' and 'usa1'), so then I just have to continue to type "1" or "2" to choose "usa1" or "usa2". But right now in vim, I have to wholly type "sa1" or "sa2", which costs more time.
Still waiting for a solution. Thanks. On Jun 8, 3:11 pm, Tony Mechelynck <[email protected]> wrote: > On 08/06/11 19:59, heirloom wrote: > > > Vim tab auto-completion for buffer names doesn't work if files are on > > different directory levels. Steps to reproduce: > > > (1) set wildmode=longest,list in vimrc > > (2) vim usa1.txt test/usa2.txt > > (3) type ":b u" in EX mode, then press TAB, it is expected to auto > > complete the word up to :b usa, which is the common header of two file > > names. But it just doesn't work. > > > Any solutions? Thanks a lot! > > > PS: if the above two files are placed on the SAME directory, it > > works!!!!! > > The following works for me: > (in the shell) > mkdir test > cd test > mkdir test > touch usa1 > touch test/usa2 > vim usa1 test/usa2 > (in Vim) > :b u<Tab> > the wildmenu (with 'wildmenu' on) shows > usa1 test/usa2 > > Both names are in the completion list. > > Of course, since there is no *common* left-hand part (the one starts > with u, the other with t), nothing is added on the command-line. (If you > typed ":edit usa2" it would edit usa2 in the current directory (a new > file), not test/usa2) > > Best regards, > Tony. > -- > hundred-and-one symptoms of being an internet addict: > 109. You actually read -- and enjoy -- lists like this. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
