? Walking in Light with Christ - Faith, Computing, Diary GNU Linux, FreeBSD, Unix, Windows, Mac OS - Hacks, Goodies, Tips and Tricks and The True Meaning of life http://www.pc-freak.net/blog Set mcedit as default text editor for mc (midnight commander) on Linux

Author : admin

If you're a vim (VI Improved) fan and you set your Linux server / desktop to use VIM as a default text editor, for those who don't know this is done either locally for user (if you're not superuser on remote server) by adding:

export VISUAL=vim export EDITOR="$VISUAL"

to ~/.bashrc or ~/.bash_profile, e.g.

echo 'export VISUAL=vim; export EDITOR="$VISUAL"' >> ~/.bashrc echo 'export VISUAL=vim; export EDITOR="$VISUAL"' >> ~/.bash_profile

1 / 3 ? Walking in Light with Christ - Faith, Computing, Diary Free Software GNU Linux, FreeBSD, Unix, Windows, Mac OS - Hacks, Goodies, Tips and Tricks and The True Meaning of life http://www.pc-freak.net/blog

or if you're root on the system e.g. it is your Linux desktop / administered by you (debian / ) server to set VIM as default text editor for all applications with cmd:

# update-alternatives --config editor

or if you haven't unset the EDITOR variable the default behavior on some Ubuntu (10.10) etc. versions mc editting would edit with nano text editor.

Just like me however you work also regularly with Midnight Commander (mc) the Linux equivalent of good old you might end up with Midnight Commander opening your files with F4 command with VIM text editor instead of the default.

So here is how to change this behavior in order to end up editting with mcedit any edited file via mc:

2 / 3 ? Walking in Light with Christ - Faith, Computing, Diary Free Software GNU Linux, FreeBSD, Unix, Windows, Mac OS - Hacks, Goodies, Tips and Tricks and The True Meaning of life http://www.pc-freak.net/blog

1. Press F9 to Activate the top menu. 2. Press o to Select the Option menu. 3. Press c to Open the configuration dialog. 4. Press i to Toggle the use internal edit option. 5. Press s to Save your preferences.

Hooray, you're done now mc will use mcedit again as default just like it was intended to be in old times on most GNU / Linux distributions. Enjoy!

3 / 3

Powered by TCPDF (www.tcpdf.org)