Visual Studio: How can I see the same file in two separate tab groups? - visual-studio

I want to be able to edit one method while looking at another method in the same file, as reference.
Can this be done?

You can open the file in another tab (Window -> New Window).
Doing so you have two copies of the same file. Then you can right-click the tab bar and select New Vertical Tab Group (or New Horizontal Tab Group, the one you like more).
Hope I understood you question..

Be on the tab you want to duplicate,then click in the menu bar at the top onWindow > New Window
Finally drag & drop the second window to the the left or right side to show both views next to each other.
Et voila, there you have it :)
EDIT
It seems that this function is not implemented in all version of VS.
In my case (V 15.4.2 (2017), V 15.9.7 (2017) & V 16.2.5 (2019)) it just works fine.

Only vertically that I'm aware. When looking at the code, right above the vertical scroll bar is a small rectangle, drag it down to get a split view of the file.

You simply use the small drag arrows icon at the top right corner of your file window as depicted in the following screenshots:

1) View the same document side-by-side (with a fix for Visual Studio 2017)
It is possible to do this using New Window and New Vertical Tab Group, however, in my Visual Studio 2017 the New Window command was missing from the Window menu. To use it, first you must add the command to a menu or assign a shortcut to it.
To add New Window to your Window menu follow this sequence, starting with the Tools menu:
Tools > Customize > Commands > Menu Bar > Window > Add Command > Window > New Window
FYI In the Commands step you decide where to put the New Window command. The sequence I gave above puts it unceremoniously at the top of the Window menu.
To view the same document side-by-side
Open the document you want to view side-by-side
Select your recently added New Window command (perhaps it's in Window > New Window)
Right click the new tab and select New Vertical Tab Group or select that command from the Window menu
2) View the same document above-one-another
If you wish to view the same document in two views on top of each other use the Window > Split command or click-and-drag the double-arrow at the top of the scroll bar for any window.
3) Get creative
FYI You can even combine the two view options to have three, four or even more views of the same document on a particularly wide monitor. On mine (2560 x 1080) I can comfortably get three side-by-side views going and split them vertically, if desired.

One can install VsVim extension and :sp :vsp does the trick.

In Visual Studio 15 you can just click inside the document and then "Window → Split"

Related

How would I remove a vertical window split in the Visual Studio 2019 IDE?

I have added a vertical window split in Visual Studio 2019. The vertical window split was created using the "New Vertical Window Group" item of the Window menu.
I would like to remove the vertical window split and return to a single window.
There are no items in the menu to remove a vertical or horizontal window group. Is there a way to remove a vertical or horizontal window group in the Visual Studio 2019 IDE?
You have to select the class you want to move to the Original Side and then select "Move to Previous Documents Group"... one by one or just close the classes as Doug Kimzey says.
There is (or should be) a command in the Window menu called "Move to Previous Document Group." This will revert to your previous arrangement.
If you set up your split view, then exit and restart the IDE, this command may be called "Move to Next Document Group" - it (seemingly) does the same thing.

How would I disable the minimap in Xcode?

How do I get rid of the minimap in Xcode?
Updated for Xcode 13
Open a code file, such as *.swift, and press the second from the right button in the top right corner. Then click on Minimap:
In older versions of Xcode, this looked as follows:
in XCode 12.0.1
there are 3 ways to hide or show Minimap.
first, you can do it with the Adjust editor option (see the following image).
next way: check or uncheck Minimap from Editor(menu) -> Minimap. (like following image)
and the last way you can use ⌃⇧⌘M and show or hide Minimap.
Navigate to Adjust Editor Options (at the top right corner, to the left of the Add Editor Below button) and uncheck Minimap (or press ^⇧⌘M).
This is called minimap window which give you insight of where you're in part of whole storyboard/code. This feature was introduced in Xcode11 and is quite useful.
You can show/hide simply by using shortcut key as: cmd + shift + ctrl + M.
Alternatively, you can choose 'Adjust Editor Options' i.e multi-lined stacked icon present on top right of Xcode. Deselect Minimap from dropdown list to hide it and Select to show it.

Visual Studio 2013 - Replace All Button gone (not just off screen)

I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.

How to move a splitted pane of editor window to another monitor?

As you know you can split an Editor window in two parts. So I can edit one part of a file and look at another of same file at same time. That is a great feature.
How can I move one part to another monitor?
Or is it possible to open the same file twice?
Under the menu item Window, select "New Window". Make sure the tab you want duplicated is selected.
The new window can be dragged on to the other monitor.

How to add "Last Position" button to my tool bar in VB6 IDE

I did this before but can't remember how the heck I did it.
I want to have a button on my vb6 IDE toolbar that takes me back to the previous place I was in the code (in my "history) -- an incredibly useful feature.
I have it in my properties (right-click) menu but don't see it in the other menus from which I could drag it to the Toolbar.
Any ideas?
This should do it:
In the IDE right click an empty spot on your
menu and select Customize...
Select the Command tab in the Customize dialog
Select View from the Categories list.
On the Commands list you should see
an item called Last Position.
Drag this item to a toolbar.
#Jay's answer is right on. There are also handy shortcut keys for this feature and the related Definition feature:
Last Position: Ctl + Shift + F2
Definition: Shift + F2
In one of the toolbars in the sample applications?

Resources