如何在单个 Visual Studio Code 会话中并排打开同一个文件 [英] How do I open the same file side by side in a single Visual Studio Code session

查看:47
本文介绍了如何在单个 Visual Studio Code 会话中并排打开同一个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我正在读取文件 xyz.py,并且作为函数 func_x(位于 x 行)调用 class_y(位于 y 行),我想同时查看 func_x 和 class_y,这样我就不会'不必继续上下滚动来读取 func_x 和 class_y.我如何并排打开文件 xyz.py 以便我可以同时读取 func_x 和 class_y?

Say I'm reading file xyz.py, and as function func_x, which is on line x, calls class_y, which is on line y, I want to see both func_x and class_y at the same time so that I don't have to keep on scrolling up and down to read func_x and class_y. How would I open file xyz.py side by side so that I can read both func_x and class_y at the same time?

这不是这个,因为它不是解释如何并排显示相同的窗口.

This isn't this, as it doesn't explain how to have the same window side by side.

推荐答案

在屏幕的右上角应该有一个拆分编辑器按钮,如下所示:

In the top right of your screen there should be a split editor button that looks like this:

这应该可以解决问题.

默认键盘快捷键(在 Windows 上)是 Ctrl+\

The default keyboard shortcut (on windows) is Ctrl+\

这篇关于如何在单个 Visual Studio Code 会话中并排打开同一个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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