Open bangedorrunt opened 3 years ago
ZettelOpen
should show window with contents of actually selected file. It should look like this:
(these are from my debugging archive, so it is best to not try to understand the contents :)
Do you want to get rid of filenames in the matched lines listing completely?
Yes, I'd like to get rid of that encrypted-look file name, no line number, no title:
, only content of title. The output should be much clearer. For example
From
Rg> Lorem |
> 35DFA979.md:10:1:title: Lorem
> 35DFB909.md:10:1:title: Lorem Ipsum
> 351GA976.md:10:1:title: Lorem Ipsum Lorem
> ....
To
Rg> Lorem |
> Lorem
> Lorem Ipsum
> Lorem Ipsum Lorem
> ....
Also with --prompt
option, we could change Rg>
to Open Note:
or something similar.
Open Note > Lorem |
> Lorem
> Lorem Ipsum
> Lorem Ipsum Lorem
> ....
Updated:
In addition, the purpose of Zettel Open is to open note, so I'm asking if it is logical to limit search to only front-matter style and/or markdown-header style only content? Technically, I'm talking about limiting search to first few lines of note. Because if I need to search for note content, we have Zettel Search for that purpose.
I've just realized that filenames are actually important in FZF listings, the selected filenames are extracted from here.
I've just realized that filenames are actually important in FZF listings, the selected filenames are extracted from here.
Thank you for your update. I don't know but I think you could somehow hide the filenames in FZF
. This screenshot is from neuron.vim
They also use FZF
for searching notes
You can achieve this by installing ripgrep and putting this in your vim config:
let g:zettel_fzf_command = "rg --column --line-number --color=always --smart-case --regexp '^title: (.+)' --replace '$1'"
let g:zettel_fzf_options = ['--with-nth=-1']
At the moment, Zettel Open is not helpful for note which is named based on random alphanumeric characters. I think it is more convenient to have an option allow to use Zettel Open which already filtered note title as output. A title could be recognized based on the following
Let's say I have a file named
35DFA979.md
For front-matter style:
or simply markdown header
Zettel Open will output content of
loremipsum
onlyMy concept could be illustrated by using RipGrep to filtered title content based on front-matter style:
I'm not very good at Vimscript in general speaking, I hope you could find this request interesting enough.
The purpose of naming file randomly is super useful that you don't have to think much about name of the note and don't have to worry about renaming it if you change of mind in future. But this could rise a problem that don't allow us to search note based on file name.