Skip to content

Instantly share code, notes, and snippets.

@bsa7
Last active August 29, 2015 14:19
Show Gist options
  • Save bsa7/91287753b2f45f4b7726 to your computer and use it in GitHub Desktop.
Save bsa7/91287753b2f45f4b7726 to your computer and use it in GitHub Desktop.
Midnight Commander keyboards shortcuts

Navigational and basic hot keys

CTRL-X + D

(compare directories) sequence must be issued by pressing together CTRL and X, and then D button - like in Emacs editor. Enter has different functions depending on the context:

  • if you have text in command line (oNavigational and basic hot keys
CTRL-X + D

(compare directories) sequence must be issued by pressing together CTRL and X, and then D button - like in Emacs editor. Enter has different functions depending on the context:

  • if you have text in command line (one with command prompt, above function keys in the last) it will be executed as command
  • if command line is empty than MC consults extensions file and will do something with selected file in active panel:
  • if file is executable - it will be executed if function open (plugin open) is defined for this extension, it will be executed.
  • If this extension is implemented as a virtual filesystem (tar file, iso file, zip file) it will be opened in the panel as it is a directory
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

up-arrow, down-arrow, page-up, page-down, home, end

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.

Function Keys

F1

Help

F2

Opens user menu

F3

View selected file content

F4

Opens file in internal text editor

F5

Copies selected file. Default is to another panel, but it asks first.

Ctrl-x s

Creates symlink of the file you're currently on (defaults to placing that symlink in the dir in the opposite panel).

F6

Moving file. Default is to another panel, but it asks first.

F7

Make directory.

F8

Delete file or directory.

F9

Opens main menu at the top of the screen.

F10

Ends current action; editor, viewer, dialog window or ends mc program. ne with command prompt, above function keys in the last) it will be executed as command

  • if command line is empty than MC consults extensions file and will do something with selected file in active panel:
  • if file is executable - it will be executed if function open (plugin open) is defined for this extension, it will be executed.
  • If this extension is implemented as a virtual filesystem (tar file, iso file, zip file) it will be opened in the panel as it is a directory #####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 #####up-arrow, down-arrow, page-up, page-down, home, end 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.

Function Keys

F1

Help

F2

Opens user menu

F3

View selected file content

F4

Opens file in internal text editor

F5

Copies selected file. Default is to another panel, but it asks first.

Ctrl-x s

Creates symlink of the file you're currently on (defaults to placing that symlink in the dir in the opposite panel).

F6

Moving file. Default is to another panel, but it asks first.

F7

Make directory.

F8

Delete file or directory.

F9

Opens main menu at the top of the screen.

F10

Ends current action; editor, viewer, dialog window or ends mc program.

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