Shougo / unite.vim

:dragon: Unite and create user interfaces
http://www.vim.org/scripts/script.php?script_id=3396
Other
2.85k stars 227 forks source link

file_rec/async returns incorrect results #1238

Closed dim882 closed 6 years ago

dim882 commented 6 years ago

Problems summary

I'm trying to simply use the commands Unite file_rec/async or Unite file_rec to navigate files in a directory, ignoring certain directories. The results are very incorrect.

Expected

I should get results of all the files in the current directory that aren't in the ignored directory.

Environment Information

Provide a minimal .vimrc with less than 50 lines (Required!)

" Your minimal .vimrc
set runtimepath+=~/path/to/unite.nvim/

call unite#custom#source('file_rec,file_rec/async', 'ignore_pattern', '(\|app/\|node_modules/\|dist/)')

The reproduce ways from Vim starting (Required!)

Enter the following in ex mode:

:Unite file_rec/async

Returns only 10 results, the last one of which is in the dist dir, which should be ignored.

:Unite file_rec/async

Returns 441 results, which includes items in the dist dir, then results stop there.

In neither case does it list most of the files in the current directory.

Upload the log messages by :redir and :message

Both return E475: Invalid argument:

Shougo commented 6 years ago

The pattern is wrong.

It must be:

call unite#custom#source('file_rec,file_rec/async', 'ignore_pattern', '/app/\|/node_modules/\|/dist/')
dim882 commented 6 years ago

Thanks. But now Unite file_rec/async returns only 9 results and Unite file_rec returns 68 results. Neither is correct.

Shougo commented 6 years ago

I don't work for it(I ignore your issue). Because, you have not uploaded the example project directory to reproduce it. I cannot reproduce the problem. So it is not unite.vim problem. Closing.