6

In vim, when I use something like :e to open files, it doesn't autocomplete files with the hidden prefix .. For example, when trying to edit a .gitignore file, I have to type out the whole name and can't just go :e .giti<Tab>. If I just type :e <Tab>, vim only lists non-hidden files.

I've noticed even FuzzyFinder doesn't actually show hidden files when I use :FufFileWithCurrentBufferDir.

Is there any way I can enable this?

Sunjay Varma
  • 5,007
  • 6
  • 34
  • 51

1 Answers1

4

Vim uses wildignore to filter the list of completions when expanding wildcards. Make sure that .gitignore doesn't match a file pattern in that list.

:help 'wildignore' is copied below

                                                'wildignore' 'wig'
'wildignore' 'wig'      string  (default "")
                        global
                        {not in Vi}
                        {not available when compiled without the +wildignore
                        feature}
        A list of file patterns.  A file that matches with one of these
        patterns is ignored when expanding wildcards, completing file or
        directory names, and influences the result of expand(), glob() and
        globpath() unless a flag is passed to disable this.
        The pattern is used like with :autocmd, see autocmd-patterns.
        Also see 'suffixes'.
        Example:
                :set wildignore=*.o,*.obj
        The use of :set+= and :set-= is preferred when adding or removing
        a pattern from the list.  This avoids problems when a future version
        uses another default.

To find out where it was last set you can use :verbose set wildignore?

FDinoff
  • 30,689
  • 5
  • 75
  • 96
  • This appears to let hidden dotted files and hidden dotted folders through: `set wildignore+=.*` But be careful this affects all plugins, who have to contend with this setting. – Eric Leschinski Jan 09 '19 at 14:19