Ⅰ. 插件描述
Enhancement's to Vim's C-Sharp FunctionalityⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tjdunklee/vim-csharp-enchanted'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tjdunklee/vim-csharp-enchanted'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tjdunklee/vim-csharp-enchanted'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tjdunklee/vim-csharp
Ⅳ. 文档说明
Vim-CSharp
This Vim bundle extends Vim's built in support for CSharp files.
Installation
If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:
OS X/Linux:
cd ~/.vim/bundle
git clone git://github.com/OrangeT/vim-csharp.gitWindows:
cd c:\users\[username]\vimfiles\bundle
git clone git://github.com/OrangeT/vim-csharp.gitSyntax Highlighting
Existing CSharp highlighting plus:
- Support for async/await keywords.
- Support for var keyword.
- Support for LINQ keywords.
- Support for automatic properties.
- Context highlighting of Interface/Class names.
- Highlighting of Generic Types.
Interface/Class Names
Interface/Class names are aliased to the Type group, for inclusion with your existing colour schemes. Alternatively, add specific highlighting for csIface and csClass to your colour scheme.
Compiler/MsBuild Support
Executing :make will look for a .sln file in the root of the working directory. If found, will run MSBuild against the highest available msbuild.exe available on the system. Errors are available in the QuickFix window.
See second screenshot above for overview.
(Note: This feature does not look for msbuild.exe in your path, but looks directly in c:/windows/Microsoft.NET for a msbuild.exe.)
Custom Build/Solution File
To use your own build file, call the following command:
:MsProjFile [path to build file]Custom Framework Version
Framework version can be overriden with the following:
:MsVersion [4, 3.5, 2, 1]Passing Parameters to :make
You can pass parameters to :make which will in turn pass them to MsBuild. This is useful for passing a variety of options, incluing a custom target for testing:
:MsProjFile build.proj
:make /target:TestTodo
- Highlighting of types in attributes.
- Adding and removing classes/files from projects and solutions (hook into NERDTree?)
- Add syntax/region support for razor files.

