Delete "new notes" that are empty and lack a new name

Use case or problem

I often use the shortcut Control+T to create a new tab.

This is a habit from other tabbed applications such as Notepad++ or web browsers.

This leads to the creation of a “new note”.

However, I might open it, then refrain from writing an actual note.

Yet, unlike in Notepad++, new empty notes are not deleted when their tab is closed.

It is a hassle to remove those empty new notes. It takes at least two steps: finding the empty note back, and removing it. The other workaround, of course, is to set up a shortcut for file deletion, and memorizing it.

If I do nothing, I find myself with a heap of “new note”, “new note”, etc. each numbering 0 bytes, that clutter my vaults.

Proposed solution (similar to Notepad++)

when closing a tab,
if contained.file starts with “%defaultNameForNewNote”
and if contained.file is empty,
then delete file,
and in any case, close the tab.

I haven used it but GitHub - husjon/obsidian-file-cleaner-redux: A plugin for Obsidian to help clean up files in your vault might help.