简体   繁体   中英

How do I configure Emacs speedbar for C# mode?

I'm using Emacs with C# Mode and when I turn on the speedbar, no files show up by default. I can choose "show all files" on the speedbar mode, but then every .cs file shows up with a '[?]' next to the name. How do I properly configure speedbar so it shows up with .cs files by default? How do I get the '[+]' next to each file so I can navigate inside the file?

I used speedbar earlier and got really irritated. I now use ECB . ECB uses its own buffer for the tree and can optionally show the outline of the CS file in a separate buffer. They all fit in the same frame while Speedbar has its own frame.

I have some custom stuff setup for ECB. You can see it here.

I think ECB with CEDET is simply too bloated. I use speedbar alone with emacs and I use the original parser for C/C++. Just add this line to your .emacs and you'll be ok:

   (speedbar-add-supported-extension ".cs")
   (add-to-list 'speedbar-fetch-etags-parse-list
            '("\\.cs" . speedbar-parse-c-or-c++tag))

This handles C# perfectly without a problem. Hope this helps.

It works for me.

I used

(speedbar-add-supported-extension ".cs") 

and got this:

替代文字

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM