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
Shortcut | Funktion | Comment |
F9 + h | open the shell link dialog | this panel |
F9 + s | open the sort order dialog | this panel (n=name, s=size, m=mod-time) |
Ctrl + o | show the terminal console | I 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 layout | horizontal / vertical |
Alt + o | show the cursored directory content in that panel | this panel Note: after establishing this stage, the cursor will move down one step, preparing for the next “Alt + o” |
Ctrl + x & q | show the cursored file content in that panel | this panel Note: F3 at this stage also allows to switch between the panel and the wide view (which is really cool) |
Ctrl + xd | compare files by content | its wise sometimes to explicitely select the files in question |
Ctrl + x & d | compare directories by content | Note: opens the intermediate compare method dialog, different files will be selected |
Alt + H | open the directory hotlist | this panel |
Ctrl + PgUp | change to the parent directory | this 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 + PgDown | change to the selected child directory | this panel Note: sitting on ../ results in Ctrl + PgUp |
Alt + i | change that to this directory | this panel |
Shft + F4 | create a new file buffer in the editor | this panel, a save is needed finally |
Shft + F6 | rename the cursored file in this directory | this panel, actually loads the file name into the dialog (instead of that directory) |
Ctrl + Space | show the cursored directory space allocation | this panel, written right into the size column Note: sitting on ../ results in a space calculation for all directories below |
mcview
Shortcut | Funktion | Comment |
Ctrl + f | display the next file in the list | this panel Note: the command respects the last sort order in the panel, aka by name or extension |
Ctrl + b | display the previous file in the list | this panel Note: see “Ctrl + f” |
Ctrl + PgDown | jump 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 mode | Note: the last used search expression will be preloaded |
? | open the search dialog in normal/backward mode | Note: see “/” |
F7 | open the search dialog in the last used mode | Note: see “/” |
n | jump to the next search match | Note: if the the last used mode is backward, the cursor will head to the begin of the file, this is just correct 🙂 |
N | jump to the previous search match | Note: see “n”, but vice versa |
Ctrl + s | jump to the next search match forward | Note: independent of the the last used mode, always towards the end of the file |
Ctrl + r | jump to the next search match backward | Note: 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):
- https://midnight-commander.org/wiki/doc/common/actions
- https://cheatography.com/brechtm/cheat-sheets/midnight-commander
- https://www.keyxl.com/aaae4b0/407/midnight-commander-keyboard-shortcuts.htm
- https://gist.github.com/samiraguiar/9cd4264445545cfd459d
- https://softpanorama.org/OFM/MC/mcview.shtml
Have fun