I'd like to learn about using vim with multiple files without using external plugins.

I read another answer that recommends putting the following in our .vimrc:

set wildmenu
set wildmode=longest:full,full

Now when I use :e <Tab> I get the following output:

enter image description here

In this case, there is a file at some/path/to/bar.rb but vim is only showing me some/.

Some questions:

  • From reading the linked answer I thought the list was supposed to be vertical. Why is it still horizontal?
  • Is it possible for wildmenu to show the full path to some/path/to/bar.rb?
  • Does my vim . followed by :e <Tab> pattern make sense? Is there a better way?
  • 1
    It is always horizontal and it is impossible to make it vertical. Mar 24, 2017 at 18:03
  • 1
    I actually saw from the linked answer that they said horizontal, I just read it wrong. But is it possible to expand the paths?
    – mbigras
    Mar 24, 2017 at 18:05
  • yes that should be possible. I think the path is always relative to Vims getcwd() path, so simply do :cd / and it should work like you want. Mar 24, 2017 at 18:11
  • How does :cd / help? It puts me in the root of my filesystem. I want some/ to be expanded to some/path/to/foo.rb while in the menu.
    – mbigras
    Mar 24, 2017 at 18:20
  • 4
    You can use <c-d> to list out the possible completion candidates. This isn't exactly vertical, but might be closer to what you want. You can also use globs to go deeper into your directory structure e.g. :e **/foo.rb<tab>. Mar 24, 2017 at 18:56

1 Answer 1


If you want wildmenu to show vertically (like completion popup) you can use:

set wildoptions=pum

Help: wildoptions - available since vim9.0 new-popup-compl

If you want to complete on all files under the current working-directory you can use

:e **/*


:e some/**/*.rb

and press TAB.

  • 1
    Welcome vi.SE @dza :) Very nice answer, thanks for the helpful catch.
    – gildux
    Jan 17, 2023 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.