vscode-extension-for-zowe
vscode-extension-for-zowe copied to clipboard
Opening multiple members in VS Code editor tabs
I'd like to have more than one PDS member open in my edit tabs on VS Code when I double click a member from the list. Today, if I double click it replaces what I have open in my current tab, rather than opening it in a new tab. If I right click and say "edit" on the member, it does open it in a new tab. This seems to break VS Code convention.
Thanks @solsu01. What is your use case here? You want to compare multiple members but to what end?
I have heard this requirement a few times in recent weeks. Just want to be clear on what you're trying to achieve and where it fits in your workflow.
@jalel01 I think this is useful for comparing files but generally, it is common to open multiple files at once to edit. This is true in a editor but also in many other programs, like MS Word.
The interaction details are a little tricky and inconsistent. Like @solsu01 said, in the VS Code explorer, a user can single click a file to open it and single click again to replace that file in the editor window. But, the user can double click to open the file in a new fixed editor tab. In the Zowe Explorer, a single or double click opens the file but replaces what was there. But, clicking on the edit icon opens the file or member in a new fixed tab. So, it seems wise to follow the VS Code Explorer convention.
I wanted to manually copy/paste portions of JCL from one member to another (because who writes any new JCL?)
What I ended up doing was opening a member, copying the content to a local file, and then using that as a scratchpad to copy into a different member.
In general, in an IDE, the user should be allowed to work with multiple source files at a time. Plus from a consistency point of view, double click should behave the same as Right click --> Edit.
The Edit action was necessary as Microsoft does not expose the double-click in the API for the tree. As we had the same requirement and could not do it that way we proposed the edit menu and icon and it was accepted as the best work around in https://github.com/zowe/vscode-extension-for-zowe/pull/242
Thanks @phaumer - it seems like a shortcoming of VS Code. Can we put in feature requests with them?
We absolutely should levy a requirement to have them expose the double click API.
I still see this happening with a double click on the tree, you have to double click the file editor tab to keep it open. I do see this resolved issue in vscode that could help with the double click of a tree item https://github.com/microsoft/vscode/issues/85636#issuecomment-726171606
This enhancement has had no community activity for 12 months. The issue also has less than 10 up-votes by the community. No action on this enhancement is targeted for the next 2 calendar quarters. Therefore, this enhancement is being closed. If you feel that this enhancement should continue to be available for community up-votes, you may reopen this issue.