Posts for #Electric Editing

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.