In Emacs, how can I use imenu more sensibly with C#?

Posted by Cheeso on Stack Overflow See other posts from Stack Overflow or by Cheeso
Published on 2010-02-10T21:03:31Z Indexed on 2010/05/09 11:18 UTC
Read the original article Hit count: 194

Filed under:
|
|
|

I've used emacs for a long time, but I haven't been keeping up with a bunch of features. One of these is speedbar, which I just briefly investigated now. Another is imenu. Both of these were mentioned in in-emacs-how-can-i-jump-between-functions-in-the-current-file?

Using imenu, I can jump to particular methods in the module I'm working in. But there is a parse hierarchy that I have to negotiate before I get the option to choose (with autocomplete) the method name.

It goes like this. I type M-x imenu and then I get to choose Using or Types. The Using choice allows me to jump to any of the using statements at the top level of the C# file (something like imports statements in a Java module, for those of you who don't know C#). Not super helpful. I choose Types. Then I have to choose a namespace and a class, even though there is just one of each in the source module. At that point I can choose between variables, types, and methods. If I choose methods I finally get the list of methods to choose from. The hierarchy I traverse looks like this;

Using
Types
  Namespace
    Class
      Types
      Variables
      Methods
         method names

Only after I get to the 5th level do I get to select the thing I really want to jump to: a particular method.

Imenu seems intelligent about the source module, but kind of hard to use. Am I doing it wrong?

© Stack Overflow or respective owner

Related posts about emacs

Related posts about imenu