csharpmode


A mode for editing C# in emacs v22 and above

This is a mode for editing C# in emacs. It's based on cc-mode, v5.30.3 and above.

Main features;

  • font-lock and indent of C# syntax including:
    • all c# keywords and major syntax
    • attributes that decorate methods, classes, fields, properties
    • enum types
    • if/#endif #region/#endregion

    • instance initializers
    • anonymous functions and methods
    • verbatim literal strings (those that begin with @)
    • generics
  • automagic code-doc generation when you type three slashes.
  • intelligent insertion of matched pairs of curly braces.
  • sets the compiler regex for next-error, for csc.exe output.
  • flymake integration, if you use it
  • integration with ya-snippet.el, if you have it.
  • imenu indexing of C# source, for easy menu-based navigation.

In addition to the basic csharp-mode, I've added a C# code completion facility. This should be considered still in development. It requires ICSharpCode.NRefactory.dll, and powershell.el. It allows code-completion in various situations. It can integrate with auto-complete.el (http://cx4a.org/software/auto-complete/), but does not require it.

The Powershell dependency means the completion magic won't run on Linux, I believe.

screen shot:

http://i.imgur.com/V6Ieo.png'>

Project Information

  • License: GNU GPL v2
  • 26 stars
  • svn-based source control

Labels:
emacs Csharp C