tags:

views:

980

answers:

8

It would be nice if it did both a list of methods to choose from and the list of potential input parameters. This was done for powershell and I was curious if there was any similar functionality implemented for emacs or vim?

Clarification:

A fellow developer I work with wants to use either vim or emacs for the low overhead without running visual studio. In essence he would like to be able to write tests, edit code in emacs or vim then just run NANT scripts to compile the code and run the tests. The only feature from Visual Studio he wants is code completion. The rest he can live without for 98-99 percent of the time.

A: 

Some of the suggestions in http://stackoverflow.com/questions/129257/eclipse-sytle-function-completions-in-emacs-for-c-c-and-java may be relevant for emacs.

Not c# specific, but still.

dmckee
+1  A: 

You can use a vim editor emulator for Visual Studio.

http://www.viemu.com/

Mateo
The person I am looking for a solution for does not want to run Visual Studio itself most of the time.
javelinBCD
A: 

I haven't come across an emacs mode that would offer code completion suggestions based on "knowledge" of the API(s) that the user's environment is offering. To a lot of people this is an issue which prevents them from attempting to use Emacs or VIM when working with rich/large/unwieldy (delete as applicable) APIs.

However I am wondering how much of a problem this would present during day-to-day work. I've been using Emacs with C#-mode to crank out quite a lot of C# code. I also tend to run dabbrev-mode or pabbrev-mode, which tends to take care of the more common function and variable names I tend to use. To my eternal shame I have to admit that I tend to have a browser open on the MSDN website to look up the rest - those APIs that I don't use often enough to remember. Another potential helper that your colleague might want to look into is icicles, which may also be a step in the right direction. Neither of these libraries however will offer the full breadth of completion support that something the like Visual Studio IDE will offer. I'd see this as part of the trade-off when using a more efficient editor.

As an aside, if your colleague is working in a team and other members working on the same project are using Visual Studio, MSBuild might offer a better solution for building outside of VS than Nant as MSBuild reads the same solution and project files that VS uses (in fact a lot of the build work in VS2008 is handled by MSBuild). The syntax isn't too far away from Nant and with the community tasks added (which gives you NUnit integration etc) and it'll ensure that everybody is using very similar mechanisms to build the executables.

Timo Geusch
A: 

I have found the http://code.google.com/p/csense this is an emacs c# intellisense/code sense. I found it from this blog post http://osdir.com/ml/emacs.sources/2007-11/msg00018.html, this may be close to the answer I was looking for.

After looking further it has not been updated since November 2007, looks stale to me.

javelinBCD
This project seems to be stillborn?
Cheeso
+1  A: 

The furthest along completion I've seen for C# is at this blog, specifically at this post. (Blog link included for context and other Emacs posts.)

If you can live with dumb completion, you might be able to roll your own with tags and tag completion.

A previous stack on the same issue.

anonfunc
In the blog post there, I outlined what it took for me to get code-completion in emacs, and let me tell you it was not so easy. Not for the feint of heart.
Cheeso
A: 

Your source code should be processed through the CEDET framework: http://cedet.sourceforge.net/

Then either use the example UIs bundled with cedet or else try any of these two: - company-mode: http://nschum.de/src/emacs/company-mode - completion-ui: http://www.dr-qubit.org/emacs.php

both supporting CEDET as a completion search backend.

apa!

A: 

For Vim, you can install insenvim. It support for the C# code completion. After download the plugin you could install the installation file or install manually by following steps:

  1. Copy the file cs_vis.vim into your $VIM\vimfiles\ftplugin directory.
  2. Copy the file csft.dll into your $VIM_INTELLISENSE directory.
  3. Copy CSVimHelper.dll,reg.bat to your $VIM_INTELLISENSE directory.
  4. Run reg.bat to register the dlls. You need to set the directory gacutil.exe in the path. You need the latest version of .NET SDK.
CyberMing
A: 

for emacs and C# you can look at this tool : http://code.google.com/p/idebridge/

raf
I'll be looking at this over the next couple of weeks, we may have a winner....
javelinBCD