Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

[Feature] Find empty files #30

Closed huyz closed 1 year ago

huyz commented 2 years ago

Sometimes I create [[Internal]] links in case some day in the future I decide to create a note there. But if I accidentally click on it, an empty file will be created, even when I'm not ready to put content in it and move into the right folder.

So it would be nice to for the plugin to also find "empty" files. The default definition of "empty" could simply be anything that only contains 0 or more whitespace characters. And perhaps there could be an additional option that considers files with only frontmatter (only whitespace after the second ---) to be considered empty too (because sometimes new files are automatically created with a template that has frontmatter with updated and created fields in them already).

(Note: this is similar to some of the functionality that https://github.com/Johnson0907/obsidian-file-cleaner offers, but I prefer listing files before quietly deleting, which is a bit scary).