dbarenholz / obsidian-plaintext

Adds support for plaintext editing into obsidian. My own purpose is to edit .bib files directly, but surely others can find reasons to use it.
MIT License
43 stars 6 forks source link

BUG: Cannot see dotfiles #9

Open dbarenholz opened 2 years ago

dbarenholz commented 2 years ago

Thanks to Vinadon#0410: it is currently impossible to edit dotfiles.

Expected: typing gitignore in the extensions field shows the .gitignore file that is present.

Actual: The file is not shown.

holroy commented 1 year ago

Usually that could be a little tricky depending on how you read your directory, since these files don't have a main file name, just the extension, so to speak.

I've not looked at your code, but adding support for dotfiles, usually means some conceptual changes, as you would need to allow specific file patterns to be scanned for. One way of handling this would be to add a specific option in your settings which would trigger a flag, so that when you're scanning the directories you also scan for those starting with a leading dot, and allow that into the file name pattern otherwise used.

Some care need to be taken related to directories vs files, which I'm assuming you're already handling somehow, and some care need to be taken since dotfiles usually are text files, but they could really be binary files as well, so you do not want to open them with any kind of auto-save enabled, as that might risk destroying the file entirely.