Midnight Commander

Midnight commander is one of the most mature software on Linux. One site explains mc in details. Many sites describe how to install and use mc. Many software developers spend most of their life while using mc (midnight commander).
Newcomers easily learn to use midnight commander and experts use its powerful features. It supports mouse but without mouse it works faster.

I am a solo developer. I use computer to:
  1. Write programmes for 8bit-avr micro-controllers in assembly language. That gives me complete control over the device.
  2. Develope applications for 8bit-avr, I use gnu-octave to handle numerical data.
  3. Confirm hardware designs, I use ngspice.
  4. Generate html (for publishing) and pdf (using latex) documents.
All the four tasks mentioned, need some sort of programming and scripting. There I need: These functions are very well supported in mc, making it an Integrated Development Environment (IDE).

The Editor

the editor

Midnight commander has a built-in editor: MCedit. A powerful editor that can handle text up to 64MB file size. I don't expect to write such a big programme in assembly for an 8bit-avr ;-). However, other features of MCedit tempt me to use it. Some of the features are:

  1. Custom keybinding. I used to be an Emacs user! So I prefer Emacs keybindings. MCedit provides almost similar keybindings as one of many choices.
  2. Syntax highlight is another powerful feature. MCedit provides coloured syntax highlight for avr-assembly, octave, ngspice, html and latex. All five are useful to me. I love to see colours, they not only beautify the code but also detect, almost immediately, spelling errors in instruction mnemonics and keywords.
  3. Quick Navigation throughout the file is easily possible using keyboard shortcuts. e.g. Alt-l will ask you the line number and jump there. This helps immediately going to the code line where some error is detected.
  4. Multiple files can be kept open simultaneously: This helps to refer to relevant subroutines in different files at the same time.
  5. Visual bookmarks are very useful in navigating amongst important routines, functions.
  6. Features like keyboard macros, auto-complete words, spellcheck, help to increase the quality of the code in general.
  7. Editor menus help to customise and automate many features using scripts. Using this I insert assembly language template when starting a new project.
  8. Using keyboard macros I can quickly type repeated strings in a document.

The File Manager

midnight commander

Although the editor MCedit is most useful to me, midnight commander is more famous as a file manager. MCedit is a part of midnight commander and that makes it a powerful IDE. Here are some examples:

There will be more such examples because working with midnight commander is a continuous improvement process. I always learn something new while using midnight commander.

Access to Terminal/Console

the editor

This is a very important feature of midnight commander. I run MC in XTerm or in console. Pressing Ctrl-o anytime will toggle to and from the terminal/console. In addition to editing and file management, I need to run assembler, latex, calculator (e.g. wcalc) and even play games. Here are some examples when I temporarily toggle to console/XTerm from midnight commander:

Running only one terminal application at a time is the only limitation. If the application is run as a background process, the limitation may vanish, but I have not tried it yet.

The only downside

Midnight commander's support for utf-8 is not perfect, particularly for Devanagari script. MC depends upon the terminal properties for this. I tried running MC in Konsole, but in vain :( . I have to use another gtk based editor mousepad using midnight commander menu, and I enjoy only the file manager and console facilities.
It is a gnu project, so I hope the development team will solve this problem in near future, I have enjoyed fast and friendly support from the MC developers' community.



आमच्याशी संपर्क साधाः
Contact us here:

लेखकः विज्ञानदूत, तारीखः Friday 02 December 2022 04:27:28 PM IST