MC Hot Keys

This is what I regularly use, working with the GNU Midnight Commander. By the way, I prefer the modarin256 as well as the modarin256root skins in the newer F9 > Options > Appearance selection. If you still need to work on older mc versions, missing this feature, take a look at my post regarding color configuration : https://bitbach.wordpress.com/2022/02/18/set-the-background-color-for-midnight-commander-in-pre-8-redhat-clones .

My 🙂 shortcut syntax below uses “+” for two keys being pressed together and “&” for the action key to follow up. An upper-case key character implies pressing Shft altogether. You may also exchange Alt and Esc, mostly appropriate on Macs. I don’t use the (mc) command line, so some shortcuts may behave differently if this input element is available (e.g Ctrl + PgUp).

mc

ShortcutFunktionComment
F9 + hopen the shell link dialogthis panel
F9 + sopen the sort order dialogthis panel (n=name, s=size, m=mod-time)
Ctrl + oshow the terminal consoleI usually switch off the command line in F9 > Options > Layout to fast file name search by start typing, so I need this to enter commands
Alt + ,toggle panel layouthorizontal / vertical
Alt + oshow the cursored directory content in that panelthis panel
Note: after establishing this stage, the cursor will move down one step, preparing for the next “Alt + o”
Ctrl + x & qshow the cursored file content in that panelthis panel
Note: F3 at this stage also allows to switch between the panel and the wide view (which is really cool)
Ctrl + xdcompare files by contentits wise sometimes to explicitely select the files in question
Ctrl + x & dcompare directories by contentNote: opens the intermediate compare method dialog, different files will be selected
Alt + Hopen the directory hotlistthis panel
Ctrl + PgUpchange to the parent directorythis panel, typing “..” as a search expression shows the same effect
Note: to leave a remote shell, see F9 + h, you’ll need to exit the remote directory tree at root “/”, see below
Ctrl + PgDownchange to the selected child directorythis panel
Note: sitting on ../ results in Ctrl + PgUp
Alt + ichange that to this directorythis panel
Shft + F4create a new file buffer in the editorthis panel, a save is needed finally
Shft + F6rename the cursored file in this directorythis panel, actually loads the file name into the dialog (instead of that directory)
Ctrl + Spaceshow the cursored directory space allocationthis panel, written right into the size column
Note: sitting on ../ results in a space calculation for all directories below

mcview

ShortcutFunktionComment
Ctrl + fdisplay the next file in the listthis panel
Note: the command respects the last sort order in the panel, aka by name or extension
Ctrl + bdisplay the previous file in the listthis panel
Note: see “Ctrl + f”
Ctrl + PgDownjump to the file end, same as “End”Note: this will also kind of refresh the display if the file has been appended, maybe the file is simply full reloaded for efficiency, which implies that the new cursor position is eof
Note2: this is “Ctrl + l” officially but it does’nt work for me
/open the search dialog in normal/forward modeNote: the last used search expression will be preloaded
?open the search dialog in normal/backward modeNote: see “/”
F7open the search dialog in the last used modeNote: see “/”
njump to the next search matchNote: if the the last used mode is backward, the cursor will head to the begin of the file, this is just correct 🙂
Njump to the previous search matchNote: see “n”, but vice versa
Ctrl + sjump to the next search match forwardNote: independent of the the last used mode, always towards the end of the file
Ctrl + rjump to the next search match backwardNote: see “Ctrl + s”, but vice versa

Did you know:

  • being in the shell link dialog, you may walk your history by Ctrl + Arrow Up/Down
  • (continuing on this) leaving an external shell file list, took me a while to find out, is possible by hitting Enter on the upmost external parent directory pointer usually denoted by “..” :

Other sites regarding this (use with caution, some content is really old and obso):

Have fun