Tomasz Wasilczyk

software developer

Midnight Commander


A file manager, clone of Norton Commander. I am working on a vim-like modeline feature implementation for mcedit.

  • C
  • Linux

Vim's modeline support

I use mcedit as my primary editor. It turned out to be a problem, when I started working on a Off-the-record messaging plugin for Pidgin. Its source code is written with formatting rules that were not consistent with the Pidgin's codebase. I had to work simultaneously with files of different indentation style, which wasn't comfortable with editor that supports only a single, global configuration.

I decided to implement a small feature from another editor, called modeline. A source code file may include a special comment, with its local editor configuration. Its development is done in ticket #3068 at mc's trac and the testing release is available in my OBS repository. This task may not be large, but I think this feature is important enough to mention it here.

Below is an example of a modeline:

/* vim: set tabstop=8 softtabstop=4 shiftwidth=4 noexpandtab: */