Home > Uncategorized > Midnight Commander: go to parent directory with Backspace

Midnight Commander: go to parent directory with Backspace

Problem
Total Commander has a nice feature: if you press Backspace, it steps back to the parent directory. How to have this shortcut in Midnight Commander?

Solution
This thing has bugged me for years! But, I was lazy to look it up. Today I got fed up and made a Google search. Guess what. I had the answer in 5 minutes…

The local config files of MC are here: ~/.config/mc. The global ones are located at /etc/mc. I like to access the local config files at ~/.mc, so first I create a symbolic link:

$ cd
$ ln -s ~/.config/mc .mc
$ cd .mc
$ cp /etc/mc/mc.keymap .
$ vi mc.keymap

Modify this line:

# new value:
CdParentSmart = backspace

Originally this line was put in comment.

Restart MC and enjoy the new feature. If you wrote something in the mini shell, you can still delete it with the Backspace. If the mini shell is empty, Backspace makes MC jump back to the parent directory.

My MC version is 4.8.13. You can verify yours with “mc -V“.

  1. April 14, 2017 at 22:30

    This is simply fantastic. This was probably my only complaint about MC.

  2. March 2, 2018 at 22:48

    Glorious! :D As an old Norton Commander user (those were the days… :p), I’m hell bent on using mc on linux. Especially on an OS like linux. It only makes sense.

  1. No trackbacks yet.

Leave a comment