How to switch the editor in mc (midnight commander) from nano to mcedit?

153,495

Solution 1

Press the following keys in order, one at a time:

  1. F9 Activates the top menu.
  2. o Selects the Option menu.
  3. c Opens the configuration dialog.
  4. i Toggles the use internal edit option.
  5. s Saves your preferences.

alt text

Solution 2

Run MC as usual. On the command line right above the bottom row of menu selections type select-editor. This should open a menu with a list of all of your installed editors. This is working for me on all my current linux machines.

Solution 3

If you want to leave mc and system settings as it is now, you may just run it like

$ EDITOR=mcedit mc

Solution 4

In user's home folder (/home/<user-name>/) there should be a file named .selected_editor. One can edit it and change it there to a desired editor.

# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/path/to/mcedit"

Or remove this file to force MC to ask about default editor on first edit.

Solution 5

Open Midnight Commander, go to Options -> Configuration and check "use internal editor" Hit save and you are done.

Share:
153,495

Related videos on Youtube

sdu
Author by

sdu

Updated on September 17, 2022

Comments

  • sdu
    sdu over 1 year

    Using ubuntu 10.10 the editor in mc (midnight commander) is nano. How can i switch to the internal mc editor (mcedit)?

  • trusktr
    trusktr over 11 years
    Can you also add how to change the editor to any other editor?
  • weima
    weima about 11 years
    It would be better to specify a way to change this from the command line, but not by changing the OS default editor.
  • Nickolai Leschov
    Nickolai Leschov about 10 years
    This is great, but is there a way to do the same in the command line, say, by adding/changing an environment variable? I'd like to automate this.
  • Sledge Hammer
    Sledge Hammer over 8 years
    Thank you! That was the only solution that worked for me with the mc version in the Ubuntu 14.04 repositories.
  • pshirishreddy
    pshirishreddy about 8 years
    Looks it has changed to 't' instead of 'i' image
  • marlar
    marlar about 8 years
    Doesn't work for me. I get a "Command not found" error from Bash.
  • hermeslm
    hermeslm over 4 years
    This solution is useful in Ubuntu (not tested in Debian) but in Redhat or Centos you need to do something like this blog rhel-centos-set-default-editor-to-nano
  • Pablo Bianchi
    Pablo Bianchi almost 4 years
    @trusktr to change to other editor you need to uncheck the option and set the EDITOR environment variable, easily with select-editor
  • Vassilis
    Vassilis over 3 years
    This is the best way to also set a custom editor like micro.
  • Admin
    Admin about 2 years
    @hermeslm, Thank you ^_^