Highlighted
Contributor.
Contributor.
1380 views

Keyboard shortcut for toggling between two sets of COBOL code?

Jump to solution

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?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Visitor.

RE: Keyboard shortcut for toggling between two sets of COBOL code?

Jump to solution

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.

View solution in original post

0 Likes
2 Replies
Highlighted
Visitor.

RE: Keyboard shortcut for toggling between two sets of COBOL code?

Jump to solution

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.

View solution in original post

0 Likes
Highlighted
Contributor.
Contributor.

RE: Keyboard shortcut for toggling between two sets of COBOL code?

Jump to solution

Thank you, kind sir.  Worked like a charm.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.