Keyboard shortcut for toggling between two sets of COBOL code?

I "enhanced" a program and screwed up something. As always, I had made a backup under a different name.  Now I'm in Microsoft Visual Studio, navigating back and forth between the original code and the enhanced code, so that I can find my boo-boo.  I'm clicking first on the tab for one program, then on the tab for the other. But that is slow and awkward.  Is there a keyboard shortcut where I can quickly flip back and forth?

  • Verified Answer

    Ctrl-Tab is the most common method for doing this. Hold down the left Control key and hit the Tab key one or more times. A pop-up window will appear, listing your open/active documents, and each press of the Tab key (while holding down Ctrl)  will cycle you through the list. A single Ctrl-Tab sequence will always take you to the last (i.e. most recent) document, effectively toggling you between two documents.

    Another alternative to repeatedly switching between tabs, provided you have a wide enough monitor, is to have the two documents/tabs open side-by-side so you can see both at the same time. There are a few ways to achieve this:

    • Method 1: click and drag on a tab to un-dock it and move the document pane to one side or the other. As soon as you start dragging, a sort of "plus-sign" docking widget will appear. Drag your cursor to either the left or right branch of this widget, and when you release the mouse button the document pane will snap into place, occupying exactly half of the docking area, while any remaining open tabs will snap to the opposite side. (Dragging to the top or bottom branch of the widget will split the screen horizontally instead of vertically).
    • Method 2: right-click on an open tab and select "New Vertical Tab Group". The tab will snap to the right, occupying half of the docking area, while the remaining tab(s) will snap to the left half.
    • Method 3: same as #2, but instead of right-clicking, click on the Window menu (on the main menu bar) and select "New Vertical Tab Group"

    You may also want to close or auto-hide the Solution Explorer (and any other "side windows") to give you a wider area for side-by-side editing. Use the X or push-pin icons at the top of Solution Explorer for this. If you close a window and later want it back, you can re-open it from the View menu.

  • Thank you, kind sir.  Worked like a charm.