Skip to content

Instantly share code, notes, and snippets.

@bsa7
Last active December 10, 2023 14:36
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsa7/e3d70e394a04b55cb266 to your computer and use it in GitHub Desktop.
Save bsa7/e3d70e394a04b55cb266 to your computer and use it in GitHub Desktop.
midnight commander cheatseet

Navigational and basic hot keys

Notes:

CTRL-X + D - compare directories or files;

TAB or Ctrl-U is switching focus between left and right panel;

Alt-T or Esc-T Change the panel display options in round-robit fashion. This way you can switch from a dual panel display to a single panel display;

Ctrl-s Search for a file in the panel;

Alt-s or Esc-s incremental search;

Use up-arrow, down-arrow, page-up, page-down, home and end keys to browse the directory content.

Ctrl-R will refresh active panel;

Ctrl-X C opens chmod dialog for marked file;

Ctrl-X O opens chown dialog for marked file;

Alt-? opens search dialog;

Ctrl-X A Open VFS list. If a ftp session times out, you can use this to free the open vfs so you can log in again;

Insert or Ctrl-T marks or removes mark on file(s);

Alt-G marks first file or directory in active panel;

Alt-R marks middle file or directory in active panel;

Alt-J marks last file or directory in active panel;

Ctrl-/ Look for filename given in last line of active panel (not whole screen), and jumps on first file;

** * ** marks removes marking for all files in active panel (not directories)

Shift+ Shift- brings up the input box where it can be given regular expression. All files with names that fill condition(s) in regular expression will be marked.

** (Backslash) remove marking for more data (opposite to "+");

Command line and shell window

Alt-Enter or Esc-Enter copies selected filename in command line;

Ctrl-x p Copies the current directory to the command line

Ctrl-x t Copies/pastes the currently selected filename(s) to the cl. Useful for using svn commands w/multiple files

??? Ctrl-Shift-Enter copies full path of selected file in the command line

Esc-H and Alt-H shows command line history (Alt-H is used by Teraterm);

Man page quote:

This section lists keys which are useful to avoid excessive typing when entering shell commands.

Alt-Enter copy the currently selected file name to the command line;

C-Enter same a Alt-Enter. May not work on remote systems and some terminals;

C-Shift-Enter copy the full path name of the currently selected file to the command line. May not work on remote systems and some terminals;

Alt-Tab does the filename, command, variable, username and hostname completion for you;

C-x t, C-x C-t copy the tagged files (or if there are no tagged files, the selected file) of the current panel (C-x t) or of the other panel (C-x C-t) to the command line;

C-x p, C-x C-p the first key sequence copies the current path name to the command line, and the second one copies the unselected panel's path name to the command line;

C-q the quote command can be used to insert characters that are otherwise interpreted by the Midnight Commander (like the '+' symbol);

Alt-p, Alt-n use these keys to browse through the command history. Alt-p takes you to the last entry, Alt-n takes you to the next one;

Alt-h displays the history for the current input line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment