Kim*_*son 6 copy-paste visual-studio-2008
我使用vim以我喜欢的方式进行了一些代码对齐 - 然后尝试将其粘贴到VS2008中.Voila,2008决定重新格式化它,删除我添加的所有空格,使一些声明精美对齐.
有没有办法让VS2008(A)粘贴而不改变空格或(B)对齐代码,如下所示?
public int SomePropertyName { get; set; }
public Nullable<string> SomeOtherProperty { get; set; }
public Nullable<int> YetAnotherProperty { get; set; }
Run Code Online (Sandbox Code Playgroud)
当我将其粘贴到VS2008中时,它会像这样结束:
public int SomePropertyName { get; set; }
public Nullable<string> SomeOtherProperty { get; set; }
public Nullable<int> YetAnotherProperty { get; set; }
Run Code Online (Sandbox Code Playgroud)
Sam*_*ham 21
此外,如果您喜欢大部分时间的重新格式化,您可以保留Hans指出的选项,并在粘贴后简单地执行ctrl + z.它不会撤消粘贴,但会撤消重新格式化代码.我更喜欢这种方法,因为大多数时候重新格式化是一件好事.但是,当我不喜欢结果时,ctrl + z就更好了.
| 归档时间: |
|
| 查看次数: |
2536 次 |
| 最近记录: |