One thing I loved back in those days when I was using (X)Emacs as a development platform was the fantastic support for editing programming languages. Obviously, C and C++ were the programming languages everybody wanted to edit at the time, and Emacs had various editing modes for these languages. The culmination point was the arrival of CC Mode, but even before that the c mode and c++ mode for Emacs had features that were called “electric”. Years later, IDEs in the MS world have finally caught up with some of the features that Emacs has to offer in terms of code formatting (VS 2005 promises a lot in that area).

Nevertheless, the ease of typing is still not comparable… certainly not without tools like CodeRush. Based on CodeRush, I created a plugin that lets me use some of the “electric” features I remember from Emacs: hungry delete and backspace and automatic newline insertion for the semicolon and the opening and closing curly braces. I have implemented the features in such a way that hungry delete and backspace should be available for all languages (you can switch on and off every single feature on a per-language basis via the CR options dialog, look for the Editor/Electric Editing page), but the electric semicolon and braces are only available for C# at the moment.

If there’s interest in having this work with C++ I might look into it, let me know please. Or does someone actually have an idea how that could be usefully implemented for VB.NET? Currently I have tried the plugin in VS 2003, because CR itself is giving me a hard time in VS 2005 (beta 1). As soon as beta 2 is finally available, I’ll try it out on that platform, until then I expect there might be problems due to the new features the editor in VS 2005 brings. Another thing I haven’t tried is running the plugin on the basis of a DXCore installation without CodeRush, so YMMV if you try to do that.

Now, here’s the download:

To install, just unzip and drop the file into the DXCore Plugin directory, which by default is at C:\Program Files\Developer Express Inc\DXCore for Visual Studio .NET\1.1\Bin\Plugins.

Disclaimer: I have taken the greatest care to create the plugin in a way so that it won’t format your hard drive or damage your system in any other imaginable way. If it does that anyway, that’s your own bad luck for downloading and installing stuff from the internet. Have fun!