michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
555 stars 72 forks source link

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

Open EdJoJob opened 2 years ago

EdJoJob commented 2 years ago

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.

michal-h21 commented 2 years ago

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 commented 2 years ago

I'll have to have another look then.