junegunn / junegunn/fzf.vim

"Find" with rg searching by path name and not STRING inside file name.

Open
#1,232 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
10.3k
Forks
608
Avg merge
5d 8h
Merged PRs (30d)
2

Description

- [x] I have fzf 0.23.0 or above
- [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
- [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
- [x] I have read through the manual page of fzf (`man fzf`)
- [x] I have searched through the existing issues

I have this in my init.vim:

```
" Searches by file name and string inside file
command! -bang -nargs=* -complete=dir Find
\ call fzf#vim#grep(
\ 'rg '.shellescape(), 1,
\ 0 ? fzf#vim#with_preview()
\ : fzf#vim#with_preview(),
\ 0)
```

At one point, doing `:Find` allows me to enter in a string in the FZF prompt and it will output a list of files which contain the string.

Right now, the current behaviour is outputting the list of files where the path matches the string. Inside the file there may or may not be the string I am looking for.

Any help would be appreciated.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.