Vim omnicompletion for C#
I was wondering if there is any tool like OmniCppComplete for C#开发者_如何学JAVA (method signature shown in the abbreviation is what I'm most interested in). I've searched everywhere with not avail.
Update: I'll be editing mostly from a shell terminal so please refrain from suggesting GUI alternatives to Vim.
Very easy. Download and install Exuberant ctags (http://ctags.sourceforge.net/) (part of any linux distribution even works on Windows).
In your project directory do this:
# ctags -R .
That generates file named "tags".
Now start up your vim in the same directory. Open a file, enjoy OmniCompletion and other things you can do with tags.
Please not while this is not ideal solution (it completely ignores the context) it gives you at least something. Big advantage is you can do the same with any other language that ctags do support (more than 40 computer languages). Also you can jump to definition (function, constant etc). Read: http://vim.wikia.com/wiki/Browsing_programs_with_tags
This may only be a workaround, but you can press Ctrl+P to auto-complete to any word previously typed in the file (use Ctrl+N for word typed after your current cursor position).
I use this plugin to get a semi-automatic completion behaviour for everything:
https://github.com/shougo/neocomplcache
You may want to check out these resources to get the settings for C# correct:
http://arun.wordpress.com/2009/04/10/c-and-vim/
http://www.vim.org/scripts/script.php?script_id=1265
You can try OmniSharp. Its omnicompletion shows method signatures:
The latest version includes an installer (for linux/mac/unix and windows) to eliminate installation issues. (It was much easier than last time I tried!)
This seems to be a bit stale. You may just want to download the PHP omnicomplete file (or any other one, but I know that's available). Then change the names of functions, classes, keywords, etc. to be the C# equivalents. Add it to your plugins directory and upload for all to use!
精彩评论