Skip to content

Tabs for integrated terminal #10546

Closed
Closed

Description

@Perkovec

Status update from Daniel Imms (@Tyriar):


Feature request.

Default terminal

image

But could be more usable...

terminals2
terminals1

Activity

  1. Tyriar commented on Aug 15, 2016

    @Tyriar
    Contributor

    The tabs were originally considered but widely panned by the team as it could cause confusion having tabs at the bottom and make vscode feel less "light-weight". If I didn't have keybindings for focusNext and focusPrevious terminals I would get very frustrated by the lack of tabs since dropdowns are a pain to use.

    Also split view was considered and then deprioritized as applications like tmux can run in the integrated terminal to achieve a similar result, I've since pivoted from this and really want to be able to split the terminal. I don't particularly want to learn tmux's keybindings and part of my workflow is to have multiple terminals displaying at once; typically a watch command that I monitor for errors and a manual build or launch command. Let's track splitting the terminal in #7504

    Steven Clarke (@stevencl) Brad Gashler (@bgashler1) please weigh in on tabs again keeping in mind that I could not find reasonable default keybindings for the terminal's focusNext and focusPrevious actions (I bind ctrl+shift+j/k).

  2. added
    feature-request
    terminal
    on Aug 15, 2016
  3. changed the title [-]Tabs and split view for integrated terminal[/-] [+]Tabs for integrated terminal[/+] on Aug 15, 2016
  4. added this to the Backlog milestone on Aug 15, 2016
  5. stevencl commented on Aug 16, 2016

    @stevencl
    Member

    We need to consider this in the context of this issue though: #9659

    I'm really wary of a tabs within tabs design. We'll end up just using all the available space to show tabs :-)

    Just thinking out loud here, do we really need to show tabs if we allowed splitting the terminal? Would it be enough if we just exposed actions to split and collapse the terminal but didn't have to show the actual tab?

  6. Tyriar commented on Aug 16, 2016

    @Tyriar
    Contributor

    Maybe, I can see myself using 2-3 split terminals over tabs/multiple terminals. Managing split terminals and tabs terminals would get very confusing and probably barely get any use due to lack of keybindings.

  7. bpasero commented on Aug 16, 2016

    @bpasero
    Contributor

    If we open the door to splitting terminals, what would it mean for splitting e.g. one terminal and one debug repl? is it the same UX interaction?

  8. added
    ux
    on Aug 16, 2016
  9. Tyriar commented on Aug 16, 2016

    @Tyriar
    Contributor

    Benjamin Pasero (@bpasero) by splitting I mean create a new terminal to the side, so yes it would be the same.

    To simplify the interaction there could be a setting to always use either the dropdown or split the terminals. That way all the existing commands would still work fine, you just choose to show 1 or all terminals at any time.

  10. bgashler1 commented on Aug 16, 2016

    @bgashler1
    Contributor

    The fear I have with introducing tabs and splitting to the terminal is that it may look like an editor group. I don't want users to be disappointed that they can't drag editors into the terminal or terminals into the editor groups.* Also, introducing this may be a slippery slope in window management, such as why do we even have a special horizontal panel for things like this in the first place. Why not just let a terminal live wherever it wants, instead of replicating so much functionality in custom UI.

    *possibly we could inform them of the limitation by locking dragging on the x-axis and/or having a disabled-cursor when trying to drag outside an area, but it's difficult to avoid people expecting this to work.

    When we introduce horizontal splitting of editor groups, one of the constraints we're imposing is that editor groups can only be horizontally split or vertically split. So it may be uncanny for users to have a panel that looks strikingly similar to a horizontal editor group (but it doesn't behave exactly the same way) sitting below vertical editor groups.

    We should talk more about this during UX sync on Wednesday. There are some designs I didn't show last time related to horizontal layouts that are relevant to this

  11. nick-walt commented on Aug 17, 2016

    @nick-walt

    What about the option of aligning the terminal with the editor tab, so that the terminal automatically reflects the language of the editor file?

    Opening a terminal would automatically load a preconfigured shell for the active (currently selected) editor's language. Multiple terminal shells must be supported in the settings.json file.

    It doesn't matter how the editors are split - the terminal always shows the shell for the selected (active) editor. This is simple and straightforward. With this method there is no need to split the terminal, no need for tabbed terminals. The terminal would continue to appear as it does now.

    If there are multiple shells available for the language, or you want to run a configuration like node shell and a git shell for the one editor tab, then perhaps the shells can be selectable within the one pane. This is a bit like tabbed terminals, except they are not presented as hard tabs, which implies a sub-context. This doesn't 'feel' substantial like a tab. Their context is within the terminal pane for currently selected editor.

    A simple hypertext string (one for each shell) located in the top right of the terminal will show the shells open (instantiated) for the currently selected editor. A user can either just click on a hypertext string, which might say node, to select it, or use a key binding to cycle through. These will replace the existing drop-down menu, the +, and the trash can. The shells could possibly be presented in lowercase.

    Either a simple hypertext string could be shown or just an icon - although, a string might be better. This would replace the cumbersome drop-down list currently used in VSCode and show the shells at a glance.

    When you switch focus from the current editor, to an editor with another language (say, Ruby), the terminal will present the IRB instance in the terminal. If the user wants to open another instance of the current shell they might only have to hover over the hypertext for that shell and click the + that will appear. If the hypertext strings are short - like node, irb, cmd, ps - another string can be created next to the string used to create the new instance. The strings would move apart to make room but wouldn't become cluttered because a limit could be set (who is going to open more than three shells against an editor?).

    Hovering over a shell might also be able to present a peak, that shows the shell content for that string. Though, if users are using key bindings to switch/cycle it might just be easier to check with that.

    If you wanted to give the user the option to add a shell not associated with the editor, like a git shell, clicking the + could present a menu of shells registered in the settings.json file. The - that would appear on hover next to each hypertext string would, of course, not show any options. It would close the current shell instance.

    If a user wanted to change the shell type, they could exit from the shell (to fall back to the default) and then launch a new shell by typing the shell name. The hypertext string representing the shell would change to reflect the new shell.

    In the case of a git shell, it might be logical to offer the option for the user to specify that a git shell will always be opened with the editor's language shell, so that git is in context to that file location. If multiple files are open from the same git location, all git shell instances across all editors will reflect the latest update or command.

    The settings.json file will likely require the user to enter the specific language extension (.js, .cs, .rb) against each terminal.internal.shell. entry so that there is a logical match up to a file. A default shell can be configured for any file type not specified in settings.json.

    The shell instance loaded for each editor lasts as long as that editor is open. As soon as an editor (a file) is closed, the associated terminal shell(s) are also closed.

    I believe that this is a simple implementation that will also make VSCode more powerful than it currently is, while being very intuitive. When the user switches contexts across language editors they don't have to think about the terminal. The terminal will always present the shell and the code last run, including the associated history, etc, that was last used for the selected editor.

  12. 321 remaining items

  13. added
    on-release-notes
    on Jul 2, 2021
  14. g3offrey commented on Jul 2, 2021

    @g3offrey

    Hi Daniel Imms (@Tyriar), Megan Rogge (@meganrogge)

    Thank you for the work on terminal editors, day after day the experience is more and more polished. ☺️

    Today playing with the latest insiders I encountered a weird bug.

    Playing with splitted editors, one terminal on the left and one on the right and using the term listing panel to switch from one to another, the terminal is completely broken.
    I'm sorry that I am unable to do a screenshot at the moment (no laptop).

    Steps to reproduce :

    Open latest insiders
    Create new terminal editor
    Split it using editor split button on top right.
    Switch from one terminal to the other (several times) using CMD+P term listing.
    I hope that my message is clear enough. If not don't hesitate to tell me, and I'll do a video for you on Monday.

  15. meganrogge commented on Jul 2, 2021

    @meganrogge
    Collaborator

    Geoffrey (@g3offrey) yes I can reproduce that. very strange, thanks. will investigate

  16. wenfangdu commented on Jul 2, 2021

    @wenfangdu
    Contributor

    Daniel Imms (@Tyriar) Could you consider exposing terminalTabsSingularSelection as a public context key?

  17. sonhanguyen commented on Jul 5, 2021

    @sonhanguyen

    Great feature!

    I have a feedback though: could we consider making the tab list floating on top instead of taking space in the layout? And maybe not taking the entire height? The right side of the terminal is almost always blank and we could also make it only shows icon and reveals when hover. The current terminal tab list is kind of wasteful especially for people like myself who mount the panel right instead of bottom.

  18. Tyriar commented on Jul 6, 2021

    @Tyriar
    Contributor

    Harry (@sonhanguyen) the current solutions for that problem are to use the narrow view or disable tabs:

    image

  19. Tyriar commented on Jul 6, 2021

    @Tyriar
    Contributor

    Wenfang Du (@wenfangdu) based on your usage above I don't think you need it, you just needed the exception fixed. Generally internal/complex context keys like that are not encouraged for use as they clutter the code/docs/autocomplete and makes changing them harder.

  20. wenfangdu commented on Jul 6, 2021

    @wenfangdu
    Contributor

    Daniel Imms (@Tyriar) Thanks, per your suggestion, I changed workbench.action.terminal.joinInstance's when condition to terminalProcessSupported && terminalTabsFocus.

  21. joenoon commented on Jul 18, 2021

    @joenoon

    Editor Terminals are great, thank you! The only issue I've run into so far is:

    • Open a couple files and editor terminals
    • Make an edit to any open file without saving
    • Right click on any open editor tab > click "Close Saved"

    This will close all saved files and leave unsaved files (as always), but also closes all editor terminals.

    I would think editor terminals would be by definition always "unsaved", remaining around after "Close Saved".

  22. Tyriar commented on Jul 20, 2021

    @Tyriar
    Contributor

    Joe Noon (@joenoon) in insiders terminal editors now are marked as dirty (need saving) when they have subprocesses, this can be disabled with the terminal.integrated.confirmOnKill setting. We're also investigating making terminal editors a little more sticky in #124709

  23. mmis1000 commented on Jul 23, 2021

    @mmis1000

    Is it possible to keep editor terminal in place after restart the vscode?
    (It's fine that the process gone and just the terminal editor keeping in place)

  24. Tyriar commented on Jul 23, 2021

    @Tyriar
    Contributor

    mmis1000 (@mmis1000) the only way to do this right now is by using tasks when default location is set to terminal (eg. auto run on window open or ctrl/cmd+shift+b)

  25. mmis1000 commented on Jul 24, 2021

    @mmis1000

    Besides that, will there be extension APIs for manipulating editor terminals?
    For example: events of getting created/merged back, query the positions or method for open it in specific place.

    (Probably not a target at all now because even the editor terminal isn't completely stabilized yet. Just ask out for curiosity)

  26. Tyriar commented on Jul 26, 2021

    @Tyriar
    Contributor

    mmis1000 (@mmis1000) we'll explore some of that in #45407

  27. locked and limited conversation to collaborators on Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestlayouton-release-noteson-testplanplan-itemterminalux

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions