Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract the integrated terminal #34442

Open
lloeki opened this issue Sep 15, 2017 · 142 comments
Open

Extract the integrated terminal #34442

lloeki opened this issue Sep 15, 2017 · 142 comments
Assignees
Labels
feature-request Request for new features or functionality terminal Integrated terminal issues
Milestone

Comments

@lloeki
Copy link
Contributor

lloeki commented Sep 15, 2017

"Feature" request.

The integrated terminal grows in functionality, to the point that it could soon become very useful standalone, as its own app. I'm only a casual VScode user (using vim most of the time), but I would definitely be interested in a well-behaved, consistent, reactively-configurable, multi-platform terminal not tied to the editor.

Obviously if such a situation were to unfold, the shared component (not entirely dissimilar to VTE) should be jointly developed and shared with VScode. Both could be able to leverage a common configuration so that whether a terminal leveraging such a theoretical common component is spawned within VScode or standalone, they behave the same.


Edit from @Tyriar:

There is some confusion about the scope of this issue, here is the clarification as the thread is long:

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Sep 15, 2017
@lloeki
Copy link
Contributor Author

lloeki commented Sep 15, 2017

Hint, hint, call the thing VSterm?

@Tyriar Tyriar added the feature-request Request for new features or functionality label Sep 15, 2017
@Tyriar
Copy link
Member

Tyriar commented Sep 15, 2017

This is an idea I've thrown around a bit, I doubt we'll get time to work on it any time soon. The first steps for this would be more flexible movement of the panel inside the workbench and pulling it into its own window.

@Tyriar Tyriar added this to the Backlog milestone Sep 15, 2017
@auchenberg
Copy link
Contributor

You should check out https://hyper.is/, also Electron based and extensible.

@lloeki
Copy link
Contributor Author

lloeki commented Sep 16, 2017

@auchenberg I definitely know about Hyper ;) yet Code's implementation is currently much more solid though, and given each one's track record in stability and performance I'd rather bet on Code. Also having the external terminal and Code's integrated one behave in exactly the same way is a non-negligible feature.

@auchenberg
Copy link
Contributor

@lloeki Hyper is migrating to xterm.js build by @Tyriar, which means that Hyper most likely will be similar to the VS Code console. I can't speak on behalf of @Tyriar, but to me it sounds like most of the concerns are addressed by this migration. vercel/hyper#1275

@Tyriar
Copy link
Member

Tyriar commented Sep 16, 2017

Yes Hyper is planning on moving to xterm.js for v2. There will be some differences such as configuration and some things are handled differently (clear in Hyper may not work on Windows for example), overall it will be very close to VS Code though.

@warpdesign
Copy link
Contributor

warpdesign commented Dec 28, 2017

I can't speak for v2 but the last time I tried Hyper it was really slow & buggy, especially under Windows.

VSCode's terminal implementation worked so good that I don't use cmd.exe anymore.

I understand it's not the priority but if I was to try to extract VSCode's terminal and make it run without VSCode where should I start?

@Tyriar
Copy link
Member

Tyriar commented Dec 28, 2017

@warpdesign what I was thinking was to be able to launch the terminal by itself using code --term or something similar, this would involve:

  • Create the "terminal window" which has access to the services used internally by the regular VS Code window (this part would be particularly tricky)
  • Modifying the CLI to support this
  • Figure out how keybindings and other user settings interact with this special window

Before starting any of this it would probably be wise to get buy in from the team though (and it's not a priority yet so I wouldn't do this yet).

@warpdesign
Copy link
Contributor

@Tyriar Ok. I'll wait then.

@donaldpipowitch
Copy link
Contributor

I can't speak for v2 but the last time I tried Hyper it was really slow & buggy, especially under Windows.

I use the most recent canary and for me it becomes really slow and buggy (disappearing texts, frozen windows and so on) as well, while the terminal in VS Code seems to work really good in everything I tried so far. (Also the copy'n'pasting behavior there seems to work better for me.) Therefor I'd 💕💕💕 to see the VS Code terminal as a stand-alone application as well.

This is an idea I've thrown around a bit, I doubt we'll get time to work on it any time soon.

Are there small steps we can do to slowly iterate to this point?

@Tyriar
Copy link
Member

Tyriar commented Jan 31, 2018

It would be a lot easier if something like this landed in Electron electron/electron#11501, that would allow sharing all the services across multiple windows. Without that, it's hard to think of smaller steps we could take as everything is a pretty big task that might be throw away if the team doesn't like it.

We could try put together a proof of concept in some branch which hacks together the terminal and necessary services, launching via code --term or something. This would be useful to get some buy in and to show it's a compelling proposition. I doubt I'll have the time to do this any time soon though.

I'll be moving on with splitting soon which is kind of a prerequisite to this anyway, we wouldn't want a stand alone terminal that couldn't show more than one instance at once. #7504

In the meantime I recommend hooking up a keybinding to toggle maximize on the panel if you haven't yet https://github.com/Tyriar/dotfiles/blob/7cdd4a9838a0cdec4508a1e484fc603f58c9e1c3/modules/vscode/config/keybindings.json#L19, I use it all the time 😃

@lloeki
Copy link
Contributor Author

lloeki commented Jan 31, 2018

This would be useful to get some buy in and to show it's a compelling proposition

This looks like a sound strategy.

we wouldn't want a stand alone terminal that couldn't show more than one instance at once

Even as a proof of concept, tmux would make this already very useful for me!

@Tyriar
Copy link
Member

Tyriar commented Jan 31, 2018

Even as a proof of concept, tmux would make this already very useful for me!

Still, it's just another thing that will make it even better as this is something on the roadmap that is definitely coming soon 😃

@bijeebuss
Copy link

I'm glad this is being worked on. The integrated terminal in VS Code is the best terminal on windows and I would love to be able to use it as a standalone app.

@goldbergyoni
Copy link

+1

@RobCannon
Copy link

I find that Hyper isn't well supported on Windows. The integrated term in VS Code is the best implementation that I have found and it would be great to be able to use the same terminal everyone that I use a command line. Of course, Windows 10 needs a feature to allow the built in terminal to be replaced by a custom terminal.

@mikemaccana
Copy link

mikemaccana commented Jul 2, 2018

This is a little higher priority for terminal users now that Sets was pulled from Fast Ring Windows 10 builds.

Sets clearly has a long way to go - starting a new tab was a slow process of opening the new tab, waiting for edge to start (if it didn't crash) and then searching for the app you wanted to start (another powershell, duh). So right now, tabbed terminals is: wait for a bunch of bugs to be fixed, wait for Windows builds to include those fixes, wait till you can install a Windows build with those fixes. This may be years.

Having a VSTerm would give us something we know works. 👍🏼

@huafu
Copy link

huafu commented Jul 9, 2018

#40829 has been marked as a duplicate, but I think they are 2 different concerns.

  1. This issue, where people want a VSTerm app or kind of (if I understand well)
  2. Issue Open terminal in separate window (support for dual screen) #40829 where the VSCode integrated terminal panel could be "detached" from the main window.

The benefit of the #2 is clear when using dual-screen: tests can be run on another screen while keeping the code with another small terminal in the bottom, WITHOUT loosing the ability to CMD-click on failing tests' paths in the detached terminal running the tests, to directly open their editor in the main VSCode window. I think #40829 should be re-opened as it makes sense it's a different issue from this one.

@Tyriar
Copy link
Member

Tyriar commented Jul 9, 2018

@huafu I'm trying to keep the issue count down, there are several issues relating to this and this is how I see them:

Once both of those are implemented you would naturally get the functionality you're after for free.

@iFwu
Copy link

iFwu commented Jun 30, 2022

It become more necessary since history of VSCode integrated terminal use different file from other terminal apps.

@Tyriar should it be using the same history file?
Originally posted by @meganrogge in #145296 (comment)

@Tyriar
Copy link
Member

Tyriar commented Jun 30, 2022

@iFwu reopened that issue to get clarity there, it should be using the same file.

@felipecrs
Copy link
Contributor

Well, you can do something like this:

hk9SDjelsO.mp4

It isn't exactly seamless though.

@ErikHumphrey
Copy link

ErikHumphrey commented Sep 14, 2022

https://github.com/xcodebuild/CodeTerminal

Darn, that repo just got archived a few days ago

@salahusama
Copy link

One thing people can do to get the VS Code terminal as a "standalone" terminal is as follows:

  1. Open a new VS Code window
  2. Open the terminal
  3. Move Terminal into Editor Area
  4. View > Appearance > Zen Mode
  5. View > Appearance > Centered Layout (uncheck)

Note 1: Zen Mode makes the window full screen, but if you exit full screen, you should still get the right view.
Note 2: I only tested this on macOS, but I imagine it would be a similar behavior for Windows and Linux.

Standalone VS Code Terminal Fullscreen

Standalone VS Code Terminal Not Fullscreen

@TrentDevelopsMS
Copy link

One thing people can do to get the VS Code terminal as a "standalone" terminal is as follows:

  1. Open a new VS Code window
  2. Open the terminal
  3. Move Terminal into Editor Area
  4. View > Appearance > Zen Mode
  5. View > Appearance > Centered Layout (uncheck)

Note 1: Zen Mode makes the window full screen, but if you exit full screen, you should still get the right view. Note 2: I only tested this on macOS, but I imagine it would be a similar behavior for Windows and Linux.

Standalone VS Code Terminal Fullscreen Standalone VS Code Terminal Not Fullscreen

I feel like this is the answer to getting to a "Pop-out" terminal. It's essentially VSCode with all the other features hidden. Probably not as optimal performance-wise but are we splitting hairs here?

On Mac I prefer to have my terminal on the desktop layout (I know, like a fiend) so I customized the layout and disabled visibility of the "Activity Bar" and "Status Bar".

@ninjasort
Copy link

ninjasort commented Dec 10, 2022

Would also like a simple button on vscode to pop out the terminal into a new window. Cheers.

image

Here is what they look like...

image

@Tyriar
Copy link
Member

Tyriar commented Dec 12, 2022

@TrentDevelopsMS we wouldn't want to ship a sub-par version that needs to load the entire workbench as we'll inevitably get complaints about memory usage. Plus, you can essentially do that already by creating a new workspace and maximizing the panel, it's just a little less convenient.

@PhilParisot
Copy link

PhilParisot commented Jan 18, 2023

Any news? Is this issue on any roadmap? That's how much I love the VS Code terminal, and I think I'm not alone, it's simply fantastic.

@Tyriar
Copy link
Member

Tyriar commented Jan 18, 2023

@PhilParisot this is the official roadmap which will probably get an update soon. It's not there yet but I expect it will be within the next 1-2 years. Intellisense in the terminal (#171648) and leveraging shell integration smarts in other ways is current big focus for the terminal right now.

@felipecrs
Copy link
Contributor

By the way, I think something like a new CLI flag would be more than enough:

code --only-terminal

Which opens the VS Code window with the terminal maximized, and panels collapsed.

@RokeJulianLockhart
Copy link

@felipecrs, I'd make it code --terminal for simplicity.

@jasondamour
Copy link

I think the main draw of extracting the integrated terminal (over using a standalone terminal application, even on which shares a codebase with VSCode) is the ability to preserve long-running operations when switching workspaces. If I start a script in one workspace then want to switch workspaces, it closes that terminal. I'd like to be able to pop-out the attached terminal and change workspaces without stopping that shell.

@Tyriar
Copy link
Member

Tyriar commented Mar 21, 2023

@jasondamour FYI you can run the detach session command and attach session in the other window, or just drag it over before closing the old window https://code.visualstudio.com/docs/terminal/advanced#_moving-terminals-between-windows

@starball5
Copy link

starball5 commented May 10, 2023

Related on Stack Overflow:

@zocky
Copy link

zocky commented Sep 16, 2023

Request to close this issue. It mixes up two completely separate concerns:
(a) using vscode's integrated terminal as a replacement for the poor native terminal implementations in Windows.
(b) detaching panels so they can be placed e.g. on a secondary monitor

Out of these, (a) is really not vscode's problem, which is why this issue never moves forward. OTOH, (b) is a much-needed feature that never gets discussed, because all feature requests that mention it are marked as a duplicate of this issue and closed (e.g. #188682).

@Tyriar
Copy link
Member

Tyriar commented Sep 17, 2023

@zocky this (a) has been on my short list of things I'd really like to do for a while. B is tracked in the highest voted issue on the repo.

If we closed this, a new issue would come up and it would take years to get the votes again...? There's clarification as to what this issue it in the top comment.

@sunglim
Copy link

sunglim commented Oct 10, 2023

@Tyriar 감사합니다 잘하셨어요 ㅋㅋ

@Tyriar
Copy link
Member

Tyriar commented Oct 10, 2023

@sunglim 오랜만이에요! 👋

@wojpawlik
Copy link

We can now open a terminal as an edutor tab, and move editors into floating windows.

@starball5
Copy link

We can now open a terminal as an edutor tab, and move editors into floating windows.

yep. already wrote this up in my answer to the linked Stack Overflow question along with keyboard shortcuts to help with it.

@Upset2

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests