michal-h21 / vim-zettel

VimWiki addon for managing notes according to Zettelkasten method
MIT License
559 stars 73 forks source link

[[ note searching with preview window like notational FZF #9

Closed agaAdams closed 3 years ago

agaAdams commented 4 years ago

Thanks for this wonderfull plugin. It makes my vim-zettelkasten-life so much easier :-)

I have the Notational FZF PlugIn installed. Is there any way to make vim-zettel use this kind of search with preview window?

justinmoon commented 4 years ago

I would also like to do this. That notational-fzf plugin makes searching a lot nicer than any of the other plain-text Zettelkasten plugins (e.g. org-roam or zettledeft in emacs).

michal-h21 commented 4 years ago

It is possible to set the variable that Notational FZF search in to contain path to your Zettelkasten. I have the following line in my .vimrc:

  let g:nv_search_paths = ['~/Dropbox/notes'] 

It is not possible to set it to the current Wiki from Vim-zettel, because Notational FZF process it at the startup and it cannot be changed later.

michal-h21 commented 4 years ago

The link searching command ([[ in the insert mode) now uses the preview window.

nate-double-u commented 4 years ago

Is there a way to insert what you've typed as a search back into the note if nothing has been found?

ie:

in insert mode [[

Search comes up, type something

"something" isn't found, hit esc.

result:

[[something

Or am I misusing it, or missing a way to do this that already exists?

michal-h21 commented 4 years ago

FZF doesn't pass anything to the callback function when no file had been selected, so the typed text seems to be not accessible to Vim-zettel, unfortunately.

agaAdams commented 3 years ago

Obviously this request has been fullfilled. Closing it, unless there is a further issue here.