I have a problem with Vim Autocompletion behavior for buffer names.

Target Soft/OS

I'm using gVim without plugins on Windows 10

What I would like to do

Assuming we have a file tree like :

  • a
  • b >
    • c
    • d
    • e0
    • e >
      • f
      • g

When I'm searching for a buffer name, here is the behavior I would like :

  • :b <Tab> => List "a" "b/" or every files in the cwd, not all buffers names if possible
  • :b b<Tab> => :b b/
  • :b b/<Tab> => List "c" "d" "e0" "e/"
  • :b a/e<Tab> => List "e0" "e/" so I can chose the right path
  • :b a/e/<Tab> => List "f/" "g/" and so on

What I have tried

set wildmode=longest:list, full

If I want to find the file "Core/types.h", and I have the file "Care/file.h" :

  • :b C<Tab> => it prints every files when I prefer to have only one level of information, like "Core/" and "Care/", not "Core/types.h" and "Care/files.h", but this is the less important issue
  • :b Co<Tab> => :b Core/ (This is nice !)
  • :b Core/t<Tab> => does nothing ! (Why it's not taking "Core/t" as a wildcard ?)
  • :b ty => :b Core/types.h (This is nice !)

Could it be because of the way I'm opening all my buffers ? I'm doing gvim **/* to load all my source files.

Basically the problem is that the autocompletion doesn't work after a directory, as :b ty<Tab> works but not :b Core/ty<Tab>

Hope I was clear and a solution exist for this problem :)


1 Answer 1


I can reproduce this with Vim 8.0.2 on Windows 8.1.

This seems to be related to the backslashes in the path. If I reconfigure Vim to use forward slashes, completion works as expected:

:set shellslash

Please report this bug, see :help bugs. Basically, open an issue at the bug tracker, or directly discuss this on the vim_dev mailing list.

  • This is exactly the problem ! Thanks, I'm reporting the bug
    – Toffanim
    Nov 24, 2016 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .