Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical split of cshtml window in VS2013

In VS2013 I want to view the same cshtml file in 2 windows side by side (i.e. vertical split). I know how to do a horizontal split but that's not what I'm after here.

The usual approach is to duplicate the tab (WINDOW, New Window) for the file and then create a new vertical tab group.

However, I cannot find a way to duplicate a cshtml tab, since the New Window menu item is disabled for that file type.

It works fine for .cs and even .js files. I tried to assign a key combo for Window.NewWindow, but it still won't work for cshtml files.

Any suggestions?

like image 645
Harald Avatar asked Dec 09 '13 05:12

Harald


People also ask

How do I split a window in Visual Studio?

Developer Community. In Visual Studio Code, there is a Split Editor Right feature in the upper right hand corner of the screen, which essentially takes the active code tab and creates another split view on the right. This is a good feature as I may wish to view different part of code within the same file.

How do I get rid of split screen in Visual Studio?

From the Window menu, select Remove Split.


1 Answers

To enable "New Window" for cshtml you can change "Single Code Window Only" from 1 to 0 in the registry key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Languages\Language Services\HTMLX.

It was probably disabled for a reason and changing 12.0_Config is prone to overwrites on next VS update, but you can try how it works.

like image 132
Sergey Vlasov Avatar answered Sep 23 '22 16:09

Sergey Vlasov