Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I vertically split a file in Visual Studio editor?

I want to open the same file in both views after doing a vertical split of the code editor window in Visual Studio. How can I do this? I'm not as effective viewing one part on top of the other! Help.

I've tried to create a new vertical tab group but can't figure out how to open the same file in both tabs. I've searched but can't seem to find a solution.

I am new to visual studio and think there has to be a way. Other code editors I have used allow a vertical split and the ability to see different sections of the same code file side by side.

like image 802
Lynetta Rajkovich Avatar asked Aug 16 '19 17:08

Lynetta Rajkovich


People also ask

How do I split a file vertically in Visual Studio Code?

(One file on the left and one file on the right.) I updated Visual Studio Code and when when I do View->Split Editor, it always splits horizontally. (One file on the top and one file on the bottom.) How can I split vertically? You can split editor into Grid layout. Check View => Editor Layout

How to split the active tab in Visual Studio Code?

1) Make the file you want to split the active tab in VS 2) Window -> New Window 3) Right click on the new tab you just created and select "New Vertical Tab Group" 3a) Now you should see the two tabs side by side

How do I split an editor window into two views?

An instance of an editor window can be split into two separate views for easier editing. To split a pane Click within the editor window to give it focus. From the Window menu, select Split.

How do I display a split section of a file?

Open the file you want to display in both vertical split sections. The file is open in a tab. Choose Window → New Window to create a clone of this tab. These two will now be named Main.cpp:1 and Main.cpp:2


1 Answers

1) Make the file you want to split the active tab in VS

2) Window -> New Window

3) Right click on the new tab you just created and select "New Vertical Tab Group"

3a) Now you should see the two tabs side by side

4) Activate tab 1

5) Window -> Split

6) Activate tab 2

7) Window -> Split

Then you will have a 2x2 view of one file.

like image 65
Victor Wilson Avatar answered Sep 28 '22 10:09

Victor Wilson