MAC上的Visual Studio中的文件缩进

问题描述:

我已经看到一些应用程序,其中C#代码在不同文件中分割,每个文件都包含部分类。从我看到它可能使这些出现缩进在Visual Studio中的Mac上就像这个例子:MAC上的Visual Studio中的文件缩进

file1 
    file1.data 
    file1.commands 
    file1.bindings 

谁能告诉我怎样才能达到这种视觉效果

只需添加一个<DependentUpon />标签中你的csproj文件。

<Compile Include="file1.cs" /> 
<Compile Include="file1.data.cs"> 
    <DependentUpon>file1.cs</DependentUpon> 
</Compile> 
<Compile Include="file1.commands.cs"> 
    <DependentUpon>file1.cs</DependentUpon> 
</Compile> 
<Compile Include="file1. bindings.cs"> 
    <DependentUpon>file1.cs</DependentUpon> 
</Compile> 

我不相信在visual-studio中有一个快捷方式可以做到这一点,除非你安装了扩展;您将不得不在文本编辑器中手动编辑csproj。另外,我不认为有任何插件可用于VS for Mac。

参考文献:

  1. Nesting Files In Visual Studio
  2. Introducing File Nestor for Visual Studio

EDIT 1 看起来像有一个nesting add-in(测试版)可用于MonoDevelop的 - 这又应该是兼容VS为苹果电脑。