简体   繁体   中英

Vim omnicompletion for C#

I was wondering if there is any tool like OmniCppComplete for C# (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

这可能只是一种解决方法,但您可以按Ctrl + P自动完成以前在文件中键入的任何单词(在当前光标位置后使用Ctrl + N键入单词)。

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:

omn​​icompletion显示方法签名

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!

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