Midnight Commander: Difference between revisions

From miki
Jump to navigation Jump to search
(moved from Linux Commands page)
 
Line 17: Line 17:
* '''Gnome-Terminal''' &mdash; To solve the conflicts with '''Gnome Terminal''', disable the ''Terminal menu shortcut key'' (to enable <tt>F10</tt>) and ''Menu Access Keys'' (to enable <tt>A-h</tt>...) in ''Gnome-Terminal''.
* '''Gnome-Terminal''' &mdash; To solve the conflicts with '''Gnome Terminal''', disable the ''Terminal menu shortcut key'' (to enable <tt>F10</tt>) and ''Menu Access Keys'' (to enable <tt>A-h</tt>...) in ''Gnome-Terminal''.
* '''Auto-Complete''' &mdash; The usual shortcut for auto-complete '''Meta-Tab''' (i.e. '''Alt-Tab''') doesn't work in graphical environment because it is used for switching between windows. As a replacement, one can use '''Esc-Tab''', or can define a new shortcut with <tt>Options... &rarr; Learn Keys...</tt> (e.g. use '''Ctrl-N''' as in ''Vim'').
* '''Auto-Complete''' &mdash; The usual shortcut for auto-complete '''Meta-Tab''' (i.e. '''Alt-Tab''') doesn't work in graphical environment because it is used for switching between windows. As a replacement, one can use '''Esc-Tab''', or can define a new shortcut with <tt>Options... &rarr; Learn Keys...</tt> (e.g. use '''Ctrl-N''' as in ''Vim'').
* Frequently used keyboard shortcut

{| class="wikitable"
|-
!key!!description
|-
|<tt>F10</tt>||Exit Midnight Commander
|-
|<tt>Esc-Tab</tt><br/><tt>Ctrl-N</tt>||Auto-Complete<br/>Auto-Complete (custom)
|-
|<tt>Ctrl-O</tt>||open sub-shell (with selected tab as current directory)
|-
|<tt>Ins</tt>||select highlighted file and move to next
|-
|<tt>Ctrl-\</tt>||Open directory menu
|-
|<tt>Ctrl-X D</tt>||Compare directories
|-
|<tt>Ctrl-R</tt>||Rescan (refresh panel contents)
|-
|<tt>Ctrl-O</tt>||Hide panels
|-
|<tt>Meta-*</tt>||Reverse selection
|-
|<tt>Alt-?</tt>||Find file
|-
|<tt>Ctrl-X Q</tt>||Quick view
|-
|<tt>Ctrl-X C</tt>||Change file and directory rights - chmod
|-
|<tt>Ctrl-X O</tt>||Change file and directory owner - chown
|-
|<tt>Ctrl-X S</tt>||Make symlink
|}

* Other frequently used keyboard shortcuts (custom shortcuts defined with ''Learn Keys...'' are <u>underlined</u>)


* Frequently used keyboard shortcuts (custom shortcuts defined with ''Learn Keys...'' are <u>underlined</u>)
<table>
<table>
<tr>
<tr valign="top">
<td valign="top">
<td>
'''General:'''<br/>
'''General:'''<br/>
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
|-
|-
|width="160px"|
|width="130px"|
<u>{{kb|C-k}}</u><br/>
<u>{{kb|C-k}}</u><br/>
<u>{{kb|C-l}}</u><br/>
<u>{{kb|C-l}}</u><br/>
{{kb|F10}}<br/>
{{kb|C-o}}<br/>
{{kb|C-x}}d<br/>
{{kb|C-r}}<br/>
{{kb|C-o}}<br/>
{{kb|M-*}}<br/>
{{kb|A-?}}<br/>
{{kb|C-x}}q<br/>
{{kb|C-x}}c<br/>
{{kb|C-x}}o<br/>
{{kb|C-x}}s
|
|
Down<br/>
Down<br/>
Up<br/>
Up<br/>
Exit Midnight Commander<br/>
open sub-shell (at current directory)<br/>
Compare directories<br/>
Rescan (refresh panel contents)<br/>
Hide panels<br/>
Reverse selection<br/>
Find file<br/>
Quick view<br/>
Change file and directory rights - chmod<br/>
Change file and directory owner - chown<br/>
Make symlink
|}
|}


Line 71: Line 58:
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
|-
|-
|width="160px"|
|width="130px"|
{{kb|A-Enter}}<br/>
{{kb|A-Enter}}<br/>
{{kb|C-S-Enter}}<br/>
{{kb|C-S-Enter}}<br/>
{{kb|E-Tab}} ''or'' <u>{{kb|C-n}}</u><br/>
{{kb|M-Tab}} ''or'' <u>{{kb|C-n}}</u><br/>
{{kb|C-x}} t<br/>
{{kb|C-x}} t<br/>
{{kb|C-x}} {{kb|C-t}}<br/>
{{kb|C-x}} {{kb|C-t}}<br/>
Line 81: Line 68:
{{kb|A-p}}<br/>
{{kb|A-p}}<br/>
{{kb|A-n}}<br/>
{{kb|A-n}}<br/>
{{kb|A-h}}<br/>
{{kb|A-h}}
|
|
Copy current selection<br/>
Paste current selection<br/>
Copy fullpath current selection<br/>
Paste fullpath current selection<br/>
Auto-complete<br/>
Auto-complete<br/>
Copy tagged files<br/>
Paste tagged files<br/>
Copy tagged files (other panel)<br/>
Paste tagged files (other panel)<br/>
Copy current path<br/>
Paste current path<br/>
Copy current path (other panel)<br/>
Paste current path (other panel)<br/>
Previous command in history<br/>
Previous command in history<br/>
Next command in history<br/>
Next command in history<br/>
Command history<br/>
Command history
|}
|}

</td>
</td>
<td>
<td>
Line 99: Line 87:
{| class="wikitable"
{| class="wikitable"
|-
|-
|width="160px"|
|width="130px"|
{{kb|Tab}}<br/>
{{kb|Tab}}<br/>
{{kb|Insert}} ''or'' {{kb|C-t}}<br/>
{{kb|Ins}} ''or'' {{kb|C-t}}<br/>
{{kb|A-g}}<br/>
{{kb|A-g}}<br/>
{{kb|A-r}}<br/>
{{kb|A-r}}<br/>
Line 121: Line 109:
{{kb|End}} ''or'' {{kb|A->}}<br/>
{{kb|End}} ''or'' {{kb|A->}}<br/>
{{kb|C-PgUp}}<br/>
{{kb|C-PgUp}}<br/>
{{kb|C-PgDn}}<br/>
{{kb|C-PgDn}}
|
|
Panel switch<br/>
Panel switch<br/>
Line 144: Line 132:
End<br/>
End<br/>
Cd ..<br/>
Cd ..<br/>
Cd current selection<br/>
Cd current selection
|}
|}
</td>
</td>

Revision as of 22:18, 1 July 2010

mc or Midnight Commander is a powerful file manager working in a shell terminal.

ini file

  • mc will only save the option ini file if there is a directory ~/.mc in home directory:
mkdir ~/.mc
  • To use vi as standard editor/viewer
First menu OptionsConfiguration...uncheck use internal edIt and Use internal view.
Next, at the end of file .mc/bindings:
default/*
    Open=
    View=view %f
    Edit=%var{EDITOR:vi} %f

Keyboard shorcuts

  • Gnome-Terminal — To solve the conflicts with Gnome Terminal, disable the Terminal menu shortcut key (to enable F10) and Menu Access Keys (to enable A-h...) in Gnome-Terminal.
  • Auto-Complete — The usual shortcut for auto-complete Meta-Tab (i.e. Alt-Tab) doesn't work in graphical environment because it is used for switching between windows. As a replacement, one can use Esc-Tab, or can define a new shortcut with Options... → Learn Keys... (e.g. use Ctrl-N as in Vim).
  • Frequently used keyboard shortcuts (custom shortcuts defined with Learn Keys... are underlined)

General:

C-k
C-l
F10
C-o
C-xd
C-r
C-o
M-*
A-?
C-xq
C-xc
C-xo
C-xs

Down
Up
Exit Midnight Commander
open sub-shell (at current directory)
Compare directories
Rescan (refresh panel contents)
Hide panels
Reverse selection
Find file
Quick view
Change file and directory rights - chmod
Change file and directory owner - chown
Make symlink

Shell Command Line

A-Enter
C-S-Enter
M-Tab or C-n
C-x t
C-x C-t
C-x p
C-x or C-t
A-p
A-n
A-h

Paste current selection
Paste fullpath current selection
Auto-complete
Paste tagged files
Paste tagged files (other panel)
Paste current path
Paste current path (other panel)
Previous command in history
Next command in history
Command history

Directory panels

Tab
Ins or C-t
A-g
A-r
A-j
C-s A-s
A-t
C-\
C-x h
+
\
A-o
A-i
A-y
A-u
A-S-h
PgDn or C-v
PgUp or A-v
Home or A-<
End or A->
C-PgUp
C-PgDn

Panel switch
Tag/untag
Select top file
Select middle file
Select bottom file
Filename search
Toggle current display listing
Show directory hotlist
Quick add to directory hostlist
Group select
Group unselect
Load directory/parent directory in other panel
Duplicate current panel
Previous directory in history
Next directory in history
View history
PgDn
PgUp
Home
End
Cd ..
Cd current selection

External links: