自动格式化与重新格式化与UN格式化 - 是否可以让VS以我编写的方式离开我的代码? [英] Auto-format vs Re-format vs UN-format - is it possible to make VS leave my code the way I wrote it?

查看:84
本文介绍了自动格式化与重新格式化与UN格式化 - 是否可以让VS以我编写的方式离开我的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮我理解如何让VS2019(16.0.4)基本上只留下我的代码吗?

Can anyone help me understand how to get VS2019 (16.0.4) to basically just leave my code alone?

我取消选中该选项(在c#文本编辑器中) )"自动格式化粘贴代码"因为我不希望它改变我的代码 - 全部。 但是如果我复制/粘贴具有缩进行的代码,使用制表符(VS转换为4个空格
,我想要),VS UN-完全格式化 - 所有对齐左,我的制表符/空格被删除。 如果我选中该选项,则会重新格式化代码。 我试图关闭与自动格式化相关的每个选项。 我只想按照我写的方式获得
我的代码,期限。 它是否可能?  

I have unchecked the option (in the c# text editor) to "automatically format code on paste" because I don't want it changing my code - AT ALL.  But then if I copy/paste code that has indented lines, using tabs (which VS converts to 4 spaces as I want), VS UN-formats it COMPLETELY - all justified left, my tabs/spaces removed.  And if I leave the option checked then it RE-formats the code.  I have tried to turn OFF every option I could find related to auto-formatting.  I just want my code the way I write it, period.  Is it even possible?  

(这是自2019年以来的一个问题,我读了很多帖子,关于这个问题需要多年。)

(This has been an issue since long before 2019, and I've read many posts that span many years about the issue.)

推荐答案


也许你不应该改变有时有用的选项,但是,当粘贴文本而不需要重新格式化,执行撤消(按< Ctrl + Z>)。


这篇关于自动格式化与重新格式化与UN格式化 - 是否可以让VS以我编写的方式离开我的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆