简体   繁体   English

为什么在剪切和粘贴F#代码时Visual Studio 2019会删除缩进?

[英]Why does Visual Studio 2019 remove my indents when cut-and-pasting F# code?

In Visual Studio 2019 with Microsoft Visual F# Tools 10.4 for F# 4.6, I am seeing unexpected cut-and-paste behavior. 在带有适用于F#4.6的Microsoft Visual F#工具10.4的Visual Studio 2019中,我看到了意外的剪切和粘贴行为。 If I cut a block of F# code and then paste it somewhere else in my file, the code block is no longer indented to the same level. 如果我剪切了一段F#代码,然后将其粘贴到文件中的其他位置,则该代码块不再缩进相同的级别。

在此处输入图片说明

This is a feature, not a bug. 这是一个功能,而不是错误。

...a feature that intelligently indents pasted code based on where your cursor is. ...一种功能,可根据光标所在位置智能地缩进粘贴的代码。
from https://devblogs.microsoft.com/dotnet/announcing-f-4-6/ 来自https://devblogs.microsoft.com/dotnet/announcing-f-4-6/

To enable or disable this feature, look at Tools > Options > Text Editor > F# > Formatting > Reformat indention on paste . 要启用或禁用此功能,请查看“ 工具”>“选项”>“文本编辑器”>“ F#”>“格式”>“在粘贴时重新格式化缩进”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM