The question is quite straightforward, so no further description is needed according to me.

I just add that I am running Ubuntu 13.04.

Any help is welcomed.


In Midnight Commander go to Options menu / Configuration... command / Use internal edit checkbox and uncheck it. (Don't forget to execute the Save setup command if the Auto save setup option is off.)

Then set the EDITOR environment variable to Sublime. You may prefer to add one of these to your shell's resource file:

  • Global setting for all programs that use EDITOR (not recommended):

    export EDITOR
  • Temporary setting for the given Midnight Commander session only:

    alias mc='EDITOR=sublime mc'

Same for the viewer, just you uncheck the Use internal view option and set the VIEWER environment variable instead.

  • why is it not recommended to set EDITOR=sublime globally?
    – MattDMo
    Jun 27 '13 at 16:07
  • 3
    Because other tools, for example crontab, are using it. Such tools may be used without X (for example from a virtual terminal in single user mode for maintenance operations) or by user who has no running X instance (for example through su -). So better keep EDITOR set to a text mode editor.
    – manatwork
    Jun 27 '13 at 16:12
  • Why 'EDITOR='sublime -w' does not work? (It seems MC ignore any supplyed options) Sep 14 '15 at 9:31

Run MC as usual. On the command line right above the bottom row of menu selections type


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.