C# 如何使用 VIM 进行 .Net 开发
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/983640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I use VIM to do .Net Development
提问by Tab
Visual Studio is the defacto editor, but what are our other options that avoid a heavy UI while still integrating with a C# build chain?
Visual Studio 是事实上的编辑器,但我们还有哪些其他选项可以避免繁重的 UI,同时仍与 C# 构建链集成?
Looking for options which preferably use vi
or vim
directly, and those which emulate some or all of the functionality of vi
and/or vim
.
寻找最好使用vi
或vim
直接使用的选项,以及那些模拟vi
和/或 的部分或全部功能的选项vim
。
采纳答案by John Slavick
回答by John Weldon
MSBuild is a very powerful analog to Ant.
MSBuild 是一个非常强大的 Ant 模拟。
Use msbuild project files to manage your .NET projects, and write a nmake file that calls msbuild.
使用 msbuild 项目文件来管理您的 .NET 项目,并编写一个调用 msbuild 的 nmake 文件。
Map your vi make command to nmake
将您的 vi make 命令映射到 nmake
You can just use :make to do a build
您可以使用 :make 进行构建
回答by Reed Copsey
Here is a guide on Vim C# compiling.
这是有关 Vim C# 编译的指南。
In response to the comments -
回应评论——
It sounds like your goal is to have a fully functional IDE that works cross platform for C# development, not necessarily to use VIM. If that's the case, you can use MonoDevelopon all platforms (including Windows, but that's a bit trickier), and since you're probably already using the mono compilers on your other platforms, this might be a nicer option.
听起来您的目标是拥有一个功能齐全的 IDE,可以跨平台进行 C# 开发,而不必使用 VIM。如果是这种情况,您可以在所有平台上使用MonoDevelop(包括 Windows,但这有点棘手),而且由于您可能已经在其他平台上使用 Mono 编译器,因此这可能是一个更好的选择。
回答by Lou Franco
If you are on the latest versions of VS, then the solution files can be built with MSBuild, which is basically a NAnt equivalent.
如果您使用的是最新版本的 VS,则可以使用 MSBuild 构建解决方案文件,这基本上与 NAnt 等效。
Otherwise, call csc to compile the files yourself.
否则,调用 csc 自己编译文件。
回答by flukus
I use nant as a build file (very simple and flexible) then call :set makerpg=nant\ compile.all
我使用 nant 作为构建文件(非常简单和灵活)然后调用 :set makerpg=nant\ compile.all
Then whenever you wan't to compile just type :mak
然后,无论何时您不想编译,只需键入 :mak
This can be extended with custom error formats etc.
这可以使用自定义错误格式等进行扩展。
回答by James
Right now there's now something called OpenIDENet from ContinuousTests https://github.com/continuoustests/OpenIDEThis along with AutoTestNet and EditorEngine provide a seamless Test Driven Development tooling for VIM.
现在,ContinuousTests https://github.com/continuoustests/OpenIDE有一个叫做 OpenIDENet 的东西, 它与 AutoTestNet 和 EditorEngine 一起为 VIM 提供了一个无缝的测试驱动开发工具。
EditorEngine gives AutoTest capabilities & commandline interactions to VIM ( ie. adding references, new projects to a solution etc. )
EditorEngine 为 VIM 提供 AutoTest 功能和命令行交互(即,向解决方案添加引用、新项目等)
AutoTest does the heavy lifting by compiling on save; as it watches a directory. It also feeds back when tests fail.
AutoTest 通过在保存时编译来完成繁重的工作;因为它监视目录。它还会在测试失败时进行反馈。
The main page provides a video demonstration & howto for this tooling. Also on windows NuGet is now available to be used from the commandline too.
主页提供了此工具的视频演示和操作方法。同样在 Windows 上,NuGet 现在也可以从命令行使用。
I must point out that I do not work for continuoustests or get any money or favor from them, it's just that they produce awesome software for developing with.
我必须指出,我不是为持续测试工作,也不是从他们那里得到任何金钱或恩惠,只是他们开发了很棒的软件用于开发。