davraamides / todotxt-mode

MIT License
59 stars 12 forks source link

Todo file pattern, use more specific pattern by default #61

Closed o-alquimista closed 7 months ago

o-alquimista commented 7 months ago

By default, todotxtmode.todoFilePattern is set to ^.*\.txt$, which makes every .txt file a TODO file. Why not set it to ^.*todo\.txt$ instead? At least in Markor Notes (Android), TODO file functionality requires the todo.txt extension.

I have files with .txt extension that are not TODO files, so I'm required to override this pattern. This becomes an annoyance when you have todotxtmode.addCreatedAt enabled, which makes pressing ENTER add the creation date to the line below the cursor. This should only happen for actual TODO files, not ordinary text files.

davraamides commented 7 months ago

Part of the reason to have config settings is so you can customize it to your needs. I use a few different files: todo.txt, done.txt, someday.txt, and waiting.txt. Personally, I wouldn't want to use a convention of <file>.todo.txt for filenames, and that may be true for others, too. They may not like my default, but they may not like your suggestion either.

But you should only need to change that setting once per machine. That's sort of expected with any software or extension - that a user may need to tweak the settings to suit their needs after installing it.