Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature idea: include additional file search paths that are normally ignored by git / ripgrep #313

Open
gitaarik opened this issue Oct 16, 2022 · 0 comments

Comments

@gitaarik
Copy link

gitaarik commented Oct 16, 2022

Hi there! I often work in projects where I need to edit files that are ignored by git or ripgrep, thus don't show up in fzf-preview. So for me it would be handy if they would show up.

I noticed you can configure your own file list commands with:

" Commands used to get the file list from project
let g:fzf_preview_filelist_command = 'custom_command'

" Commands used to get the file list from git repository
let g:fzf_preview_git_files_command = 'custom_command'

" Commands used to get the file list from current directory
let g:fzf_preview_directory_files_command = 'custom_command'

That's really nice. So I made a little zsh script that searches a project with additional paths configured in a .fzf_preview_include file. See my Gist here: https://gist.github.com/gitaarik/bc7c6724a1868f8d89f5a97f794f14f2

I think this might be a nice feature to have included in fzf-preview. I guess however that a zsh script is maybe not appropriate. I'm not so familiar with vim plugin development. In any case, I think it would be very useful, because it has been frustrating me sometimes that some paths don't show up in fzf-preview. It could also maybe be included in the readme in section "Requirements -> Optional".

Edit: I would also like to use this command for non-project directories. These vim config variables that you can set only influence the project directory commands like :FzfPreviewProjectFilesRpc. So it does not work for :FzfPreviewDirectoryFiles.

Also, there doesn't seem to be a MRU variation of the :FzfPreviewDirectoryFiles command. Which would also be really helpful. Why is there only MRU for project (git) dirs (FzfPreviewProjectMruFiles) and not for regular directories?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant