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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 04:53:35  来源:igfitidea点击:

How can I use VIM to do .Net Development

c#.netvimcompilation

提问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 vior vimdirectly, and those which emulate some or all of the functionality of viand/or vim.

寻找最好使用vivim直接使用的选项,以及那些模拟vi和/或 的部分或全部功能的选项vim

采纳答案by John Slavick

I'm not connected with the company in any way, but I've heard very good things about ViEmu. If the price were a little lower, I'd get it myself, because I love the editing power of Vim.

我与公司没有任何联系,但我听说ViEmu非常好。如果价格低一点,我会自己买,因为我喜欢 Vim 的编辑功能。

回答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.

我必须指出,我不是为持续测试工作,也不是从他们那里得到任何金钱或恩惠,只是他们开发了很棒的软件用于开发。