With Visual Studio, Open Same File In Two Windows, Updates Reflected in Both

I’ve always been frustrated in Visual Studio (all versions I can remember including latest vs2012) with not being able to look at the top of a file and edit the bottom.  Recently, on an Microsoft insiders list I participate in, someone posted that exact feature as a suggestion for future versions of Visual Studio.  Before I had a chance to post back a “+1” some one else posted back that you’ve been able to do that for years in all the versions of Visual Studio he could remember.

All you have to do is, with the version of the file you want to duplicate open (you are selected to that tab), press the menu choice “Window/New Window” and presto!  you have two copies.

image

Now, after pressing Window/New Window you get:

image

And, if you do the nice “multi monitor” support in Visual Studio by dragging one off of Visual Studio on to your desktop, you now can see and edit two copies of the same files.  Changes in one are immediately updated in the other.  Just what I’ve always wanted!!!

image

Not so discoverable, but an awesome feature.  Maybe it would be nice, as someone else suggested, to have that in the drop down of the file’s tab and it would be easier to find.

Hope this helps!

http://peterkellner.net/2012/07/08/with-visual-studio-open-same-file-in-two-windows-updates-reflected-in-both/

可惜的是,直到 2013,VS 并不是对所有的文件类型都支持双窗口,于是你需要下面的方案。不过,经过实验,对于13有用,对于12则会出现虽然打开了第二个窗口,但是窗口中内容为空。

http://stackoverflow.com/questions/728949/open-two-instances-of-a-file-in-single-visual-studio-session

不过上面的链接操作起来有实际困难,实际你只需要查询注册表中的“Single Code Window Only”,然后全部改为值为0就可以了。

 

posted @   陆敏技  阅读(540)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
Web Counter
Coupon for Contacts
点击右上角即可分享
微信分享提示