简体   繁体   中英

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

在此处输入图片说明

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/

To enable or disable this feature, look at Tools > Options > Text Editor > F# > Formatting > Reformat indention on paste .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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