Move "Delete current file" from top spot in ordering

Use case or problem

  1. Enable the core Slash commands plugin.
  2. Type / in a note.
  3. Accidentally hit enter without typing anything :scream:.

  1. Be sad that your file is deleted.

Proposed solution

Move the Delete current file command out of the top position and replace it with something nondestructive. e.g. Show debug info, Show release notes, etc.

Current workaround (optional)

Make sure you don’t hit enter there. :slightly_smiling_face:

Related feature requests (optional)

Update:

After playing around a bit, I noticed the Slash commands follow along with the new (as of v1.8):

  • Recently used commands now appear at the top of the command palette.

so Delete current file will shift out of that top position after using a few other commands. Much better.

To refine the request a bit: make sure there are no destructive commands in that top slot (if possible).

5 Likes

This just happened to me on mobile.

Forward slash is used alone in many contexts, like directory paths on MacOS, Linux, and others.

Data loss is the number one scariest thing when using a knowledge management app and leaving ā€œDelete Current Noteā€ as the default action is unconscionable.

I have fully disabled the slash commands core plug-in until this is remedied.

PLEASE FOR THE LOVE OF ALL THINGS HOLY. FIX THIS!
THE ONLY THING SAVING ME is that i use the git plugin but this happens to me at least once every 2 days on something important

Renaming as this also applies to Command Palette and has to do with smart reordering of prompts by frequency.

1 Like

Rather than replacing it with something that would cause a popup, I’d suggest an empty null slot that does nothing until the user at least types something.

I hear you. I agree. But can you also use Obsidian trash or system trash as a second-last resort?

1 Like

Use case or problem

When you open the command palette, the top/default action is normally ā€œdelete current fileā€. This means that if you open the palette and hit done/enter without any further input, Obsidian immediately nukes the currently open note without warning.

This is particularly egregious on mobile where it is easy to accidentally open the palette when repeatedly swiping down in order to scroll to the top of a long note. This is confounded by the fact that ā€˜done’ can reasonably be assumed to do nothing with no input (if you don’t notice the highlighting… which is likely on a menu that you accidentally opened and just want to go away) and the fact that ā€˜done’ is much easier to press in the UI than ā€˜X’.

Proposed solution

Make the top/default action something more benign. ā€˜Save current file’ is likely a good candidate, but literally anything else is likely to be better than deleting the file.

Current workaround (optional)

I’m working around this by manually pinning some other action to the top of the command palette in settings; however, it was many months before I realized why my notes were being deleted seemingly at random and many more months before I realized that pinning actions was possible in settings…

this was changed in v1.9. ā€œDelete current fileā€ is not the first unless it was the last used command.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.