vim-fuzzbox/fuzzbox.vim

let g:files_respect_gitignore = 1 causes bad directory handling

Closed this issue · 2 comments

Follow these steps:

First, set let g:files_respect_gitignore = 1 in ~/.vimrc.

Then,

$ cd /tmp
$ git init test-repo
Initialized empty Git repository in /tmp/test-repo/.git/
$ mkdir test-repo/src
$ touch test-repo/src/main.c
$ cd test-repo/src
$ vim

Invoke <space>ff to view files. It says src/main.c not found. But, if you launch vim from the main repository directory, it correctly sees and loads the file.

Without the option, the plugin behaves as expected.

Hi,

I think your problem is fixed in commit f8e7ee7 in pull request #49

If you install fd you can work around the problem for now, it seems like fuzzyy is falling back to using git ls-files to respect gitignore, but there is an issue with this on the main vim9 branch, which I fixed in my PR.

The problem is the use of --full-name with git ls-files, in your example repo, when the current working directory is src, the path to main.c is being reported as src/main.c, and src/main.c is indeed not found relative to src.

If you install fd you can work around the problem for now,

Can confirm this workaround works. Thanks.

Very nice alternative to fzf.