Bug #53718 Allow to switch between tabs using keyboard only
Submitted: 17 May 2010 20:13 Modified: 15 Jul 2013 13:09
Reporter: Orlando Colamatteo Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version:5.2.21 RC Rev 5918, 5.1.23 OS:Any (Windows 7 64-bit, Mac OS X)
Assigned to: CPU Architecture:Any
Tags: Connection, sql editor, sql script

[17 May 2010 20:13] Orlando Colamatteo
Description:
Allow each SQL Script tab to have an independent connection to the server. When I open a server and open multiple script tabs only one tab can be running a query at a time which limits the usefulness of being able to open multiple tabs for one server.

How to repeat:
Open SQL Editor and connect to a server. Open a second tab by pressing Ctrl-T. Run a long-running query in one of the tabs. Switch to the other tab and notice that you cannot run a query there.
[18 May 2010 6:30] Valeriy Kravchuk
It would be a nice configurable option to have. I do not think that opening new connection for every tab by default is a good idea though.
[19 May 2010 11:05] Johannes Taxacher
Hello Orlando,
I think the feature you are looking for is already there, in query->"new tab to current server". This duplicates the complete SQL-Editor-Main-Tab establishing a new connection. Ctrl+T opens just a new text-buffer inside the SQL-Editor-session.
is that what you need?
[20 May 2010 21:07] Orlando Colamatteo
It does suffice, however it is not what I was after. I accomplish this now by going to the Home tab and double-clicking the server I want a new connection for. I did not know about the Query>New Tab To Current Server method of opening a new connection to a server which I will use now since Alt+Q, N is faster than using the mouse.

I guess I was confused as to the purpose of Script Tabs. If Workbench does not support running queries from two Script Tabs within the same Server Tab simultaneously then the usefulness of Script Tabs is very limited for me.

When only having one Script Tab open Ctrl+Tab moves you to the next Server Tab. However when you have more than one script tab open within a server Ctrl+Tab moves you to the next Script Tab and there you lose the ability to run another query while the first one is running without using the mouse to go to the next Server Tab and that is not ideal for me. I guess I will no longer be using Ctrl+T and instead will use Alt+Q, N to accomplish the workflow I would like to use. 

I am a SQL Server professional learning MySQL so I have some tendencies related to using SQL Server Management Studio (and Query Analyzer before that) for the last 12 years. In SSMS Ctrl+T opens a new Script Tab with a new connection to the same server of the Script Tab you were on.

Thanks for the input. I can adjust.
[21 May 2010 10:12] Susanne Ebrecht
Many thanks for writing a reasonable feature request.
[26 May 2010 7:38] Johannes Taxacher
We added a new shortcut Ctrl/Cmd+Shift+T for activating the "New tab to Current Server" Menu-Item.
so its now Ctrl/Cmd+T for creating a new text-tab within the query-session and Ctrl/Cmd+Shift+T for opening a new Query-Session/connection to the same server.
[27 May 2010 9:29] Susanne Ebrecht
We discussed this bug report yesterday.

We figured out that we are a little bit confused about your statement about what you were after.

Please can you try again to explain us what you think Workbench should be able to do but it isn't able to do it?
[28 May 2010 16:39] Orlando Colamatteo
To summarize I want to be able to move between different tabs and create new tabs, all with independent connections to a server, without ever using the mouse.

Scenario: I have one Server Tab open with one Script Tab within it and I execute a long-running query. Now I want to start working on another script against the same server while my long-running query is running. How do I do this in WB? I would press Alt+Q, N or eventually using the enhancement Johannes talked about I would press Ctrl+Shift+T to spawn a new Server Tab with an independent connection to the same server and go to work on my second query. I spawn two Script Tabs within my Server Tab and start working on more queries. Now let's say I want to flip back to the first Server Tab to check on the progress, how would I do that? In some scenarios, depending on which Script Tab has the focus, Ctrl+Tab will move me either the next Script Tab within the Server Tab or the next Server Tab. The Ctrl+Tab behavior is not intuitive or completely controllable via the keyboard to reach all available Script and Server Tabs, i.e. I am usually forced to use the mouse to get to where I want to go within the Tabs. May I suggest re-assigning the Ctrl+Shift+Tab shortcut to always switch to the next Script Tab and assigning Ctrl+Tab exclusively to switch to the next Server Tab?
[15 Jun 2010 12:44] Valeriy Kravchuk
I agree with last comment in the following: there is no way to switch between SQL Query tabs in SQL Editor (at least on Mac, even with 5.2.23 to be released soon) using only keyboard. I've changed synopsis accordingly.
[4 Aug 2010 17:23] Orlando Colamatteo
May I suggest that you combine the notion of a "server tab" and a "sql tab" and simply make all tabs a "server tabs" with the possibility of one and only one "sql tab" within them?

This way a shortcut like Ctrl+N could open a new "tab" with a connection to the same server of the current tab and the shortcut Ctrl+TAB could unambiguously move you from one tab to the next.
[15 Jul 2013 13:09] Alfredo Kojima
There are already shortcuts to add new connection tabs, add new editor tabs, switch between connection tabs and a new pair for switching between editor tabs will be added, as duplicate of bug #68968