I've been trying to figure out how to erase directories faster when I use find-file in vanilla Emacs. An example is Doom Emacs, you press backspace once, and erase the entire directory, but when I try to do the same thing on vanilla Emacs, I need to erase the entire directory name. How I can modify this behavior to make my Emacs file navigation faster?

  • The question isn't clear. You seem to contrast a wished-for "erase the entire directory" with an existing need to "erase the entire directory". Please make clear the distinction you're trying to draw.
    – Drew
    Dec 11, 2021 at 22:10

1 Answer 1


Does C-x DEL (C-x <backspace>) do what you want? That's bound by default to backward-kill-sentence, which generally deletes all or most of what's already in the minibuffer before point.

You can of course bind that command to another key. And you can do that in a minibuffer keymap, if you don't want to do it globally. Globally DEL (<backspace>) is bound by default to backward-delete-char-untabify.

  • instead of erasing everything, I want to return one directory
    – EasterEgg
    Dec 12, 2021 at 0:23
  • ok, found it, just used backward-kill-word, thanks :D
    – EasterEgg
    Dec 12, 2021 at 0:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.