2

I want to setup micro as the default editor in Midnight Commander (I was using the default nano). I've installed micro as a snap.

I deleted the file .selected_editor in my home user folder so now it gives me a list of editors each time that I press F4, but micro does not appear in this list.

Select an editor.  To change later, run 'select-editor'.
  1. /bin/nano        <---- easiest
  2. /usr/bin/vim.basic
  3. /usr/bin/mcedit
  4. /usr/bin/vim.tiny
  5. /usr/bin/code
  6. /bin/ed

Choose 1-6 [1]:

What can I do to make micro my default editor?

I'm using Ubuntu MATE 18.04 LTS, my terminal is Terminator and my Micro version is 2.0.6.

2 Answers2

1

To use another editor than those proposed by mc, just choose any of the options so mc creates the ~/.selected_editor file.

Then edit that file and replace the path to the executable in it to the editor you want to use. You need to use a command line that would also work in a terminal.

Sebastian
  • 1,451
0
  1. Install micro (for e.g., with brew).
  2. Disable mc internal editor.
  3. Use select-editor command (already there, from sensible-utils package; instead of editing any file directly).
Pablo Bianchi
  • 17,371