Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: how to make it an editor in a midnight-commander?

Tags:

emacs

mc

My question is about Midnight-commander. I've unset usage of internal editor (in Options -> Configuration) and put in .bashrc:

export EDITOR='emacsclient -n'

still - pressing F4 gives nothing, pressing F3 - opens in vi. Is there a way to make emacsclient to be a default text editor in mc?

like image 439
Adobe Avatar asked Nov 08 '11 16:11

Adobe


1 Answers

Remove ~/.selected_editor, then when you press F4 next time, MC will prompt for select editor. Or, you may directly change it.

$ cat .selected_editor
# Generated by /usr/bin/select-editor
SELECTED_EDITOR="/usr/bin/vim.basic" 

This works on Ubuntu. I have tried any other ways to setup default editor which won't help.

like image 195
Mingjie Li Avatar answered Sep 28 '22 02:09

Mingjie Li