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

Search in sub-directories when using search other than ag #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EdJoJob
Copy link
Contributor

@EdJoJob EdJoJob commented Jun 13, 2022

When setting g:zettel_fzf_command to something other than ag, this
is the smallest change that preserves the search tool looking through
sub-directories.

To test:

  1. Have a folder in the zettel directory, with a wiki file in that
    folder.
  2. Search for some content in that file
  3. See that it appears in the fzf matcher

Set the below in your Vim config, and the content will not be in the
fzf-matcher:

let g:zettel_fzf_command = "rg --column --line-number --ignore-case --no-heading --color=always "

Update to use this change and it will be available with the rg tool.

When setting `g:zettel_fzf_command` to something other than `ag`, this
is the smallest change that preserves the search tool looking through
sub-directories.

To test:
1. Have a folder in the zettel directory, with a wiki file in that
folder.
2. Search for some content in that file
3. See that it appears in the fzf matcher

Set the below in your Vim config, and the content will not be in the
fzf-matcher:
```vim
let g:zettel_fzf_command = "rg --column --line-number --ignore-case --no-heading --color=always "
```

Update to use this change and it will be available with the `rg` tool.
@michal-h21
Copy link
Owner

I am not sure if I followed your steps correctly, but with this change, Vim-zettel searches only in subdirectories of the actual wiki, and moreover, when I select a file in the subdirectory, it fails with an error.

@EdJoJob
Copy link
Contributor Author

EdJoJob commented Jun 14, 2022

I'll have to have another look then.

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

Successfully merging this pull request may close these issues.

2 participants