microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.88k stars 28.75k forks source link

Request feature "Integrated terminal" #143

Closed kkdai closed 8 years ago

kkdai commented 8 years ago

It would be great if vscode has integrated terminal feature refer vim or atom https://atom.io/packages/term3

I saw this suggestion pending in uservoice(https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7752357-integrated-terminal) and repost here since it has specific repo

chief10 commented 8 years ago

I think this would be nice, but I understand why they would want to keep it separate.

chai2010 commented 8 years ago

+1/0

mdmagnusson commented 8 years ago

+1

jaredcnance commented 8 years ago

+1

worellana commented 8 years ago

+1

jonathandion commented 8 years ago

+1

imseanpan commented 8 years ago

+1

willin commented 8 years ago

+1 https://atom.io/packages/terminal-panel

Tyriar commented 8 years ago

Hi all, I've started work on the integrated terminal and have a prototype up and running (branch), this will likely be integrated into the product in the May release.

Prototype

Here's what it looks like so far:

image

Some things to call out:

Initial milestone

Here is a rough todo list for the initial milestone, not all of these will necessarily make it in for the May release:

Features

Bugs

Beyond

Here are some of the ideas that will eventually be turned into issues/feature requests later on:

novafluxx commented 8 years ago

Awesome!

Laskewitz commented 8 years ago

Really nice! :+1:

nhack commented 8 years ago

Cool!!!

On Friday, 22 April 2016, Daniel Imms notifications@github.com wrote:

Hi all, I've started work on the integrated terminal and have a prototype up and running, this will likely be integrated into the product in the May release. Prototype

Here's what it looks like so far:

[image: image] https://cloud.githubusercontent.com/assets/2193314/14754041/b923a0e6-088d-11e6-928b-2f897407fe29.png

Some things to call out:

  • .bashrc is parsed and auto-complete works as you would expect
  • A default set of colors will be provided for light and dark modes
  • ctrl+` will probably be the default toggle terminal keybinding
  • The terminal is a "panel", meaning it can only be shown on the bottom of the editor currently (like the Output panel)

Initial milestone

Here is a rough todo for the initial milestone, not all of these will necessarily make it in for the May release:

Features

  • Customize colors via settings.json
  • Customize font via settings.json
  • Handle title change, visualize in UI
  • Terminal selection, copy and paste
  • Open the terminal in the root open folder when available
  • Add toggle terminal to menu
  • Create default light theme color set

Bugs

  • Focus the terminal input when anywhere inside the terminal panel is clicked
  • Propagate focus from panel focus to terminal
  • Prevent certain keybindings from triggering while in terminal
  • Determine terminal char font in a font-agnostic way
  • Set background color on Terminal object instead of using !important css rule

Beyond

Here are some of the ideas that will eventually be turned into issues/feature requests later on:

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/Microsoft/vscode/issues/143#issuecomment-213581854

Marius Cristea

garthk commented 8 years ago

Please, everyone: use GitHub's new "Reactions" feature. Please don't crowd out the discussion with "+1", "Cool", "Awesome", or "Nice".

GitHub doesn't show the grey smiley face icon for Reactions on mobile browsers. On iOS, you can tap the share arrow then "Request Desktop Site" to see them.

factormystic commented 8 years ago

@Tyriar I assume the shell will be configurable? This branch should try to be shell & os neutral as possible, I hope...

Tyriar commented 8 years ago

@factormystic that's the plan; configurable and work on all OS'. The feature branch currently is only tested on Linux but I expect it to work on OS X as well.

bobmagicii commented 8 years ago

the .bashrc thing worries me. it worries me because on windows, i still want my plain old (but recently upgraded in w10) cmd.exe used instead. all my system vars and such that i've setup for my dev environment on windows, etc.

factormystic commented 8 years ago

Atom's terminal-panel package that @willin linked also works on Windows, so maybe look there for inspiration

jonathandion commented 8 years ago

Awesome! thanks On Fri, Apr 22, 2016 at 7:41 PM Bob Majdak Jr notifications@github.com wrote:

the .bashrc thing worries me. it worries me because on windows, i still want my plain old (but recently upgraded in w10) cmd.exe used instead.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/Microsoft/vscode/issues/143#issuecomment-213627296

bobmagicii commented 8 years ago

not worried about it working /on/ windows. i am worried about it working /with/ windows.

Tyriar commented 8 years ago

@factormystic @bobmajdakjr I clarified that Windows support is indeed the plan in the main comment. It uses pty.js and term.js which I believe play nicely with cmd.

wclr commented 8 years ago

Multiple terminals per opened project will be needed. And npm/gulp/other task runers should be integrated with it.

GJSmith3rd commented 8 years ago

You mentioned this will be implemented as a panel. +1 Split panels for the terminals and also for debug and console panels. Anyone know if there's an issue for split panels at the bottom?

Tyriar commented 8 years ago

@GJSmith3rd This is the closest I can find https://github.com/Microsoft/vscode/issues/2806 - making panel positions configurable.

edgariscoding commented 8 years ago

Awesome!

jvandyke commented 8 years ago

This is great news! Obviously, integrating a terminal emulator is like endeavoring to create a completely new product. It's not just a feature. I'm curious about where we should set our expectations, long-term.

Some specific things: I use tabs in iterm2 to run multiple processes. Is a feature like this planned or will we have to use screen/tmux tabs? Will there be any integration with the editor itself? "Open terminal from here", "Run file in terminal", access from extensions, etc.?

Tyriar commented 8 years ago

@jvandyke the libs being used allow the system shell to be leveraged so there is no reinventing of the wheel going on at the moment. The kitchen sink metaphor that @joaomoreno used is spot on and I don't think we would be pursuing this if we had to implement everything from scratch.

Multiple terminals/tabs are definitely a feature I would expect, it's in the beyond section. Integration/extensions certainly seem to have some compelling use cases, it's probably a bit far out to speculate on when that would come and in what form.

zeek-r commented 8 years ago

Now, that feature is gonna make it the best ide on linux. Awesome, thanks

smkamranqadri commented 8 years ago

Finally. +1

benbazus commented 8 years ago

Cool!

rogierlommers commented 8 years ago

Yes, very cool. Love it.

scalalang2 commented 8 years ago

I can't wait to see it!

willin commented 8 years ago

@Tyriar

ref: https://atom.io/packages/terminal-panel

if zsh supported i'll appreciate that

trinvh commented 8 years ago

+1 from the uservoice !

danielpsf commented 8 years ago

Awesome... Thx ;)

ansarizafar commented 8 years ago

+1

koutsenko commented 8 years ago

+1

While performing Windows tests, test it with ConEmu application also. It's very powerful multitab terminal emulator. Please & Thanks.

bbenoist commented 8 years ago

@pflannery Which command do you use to properly attach vscode within ConEmu?

Regular -new_window flag actually opens a command prompt then creates a new Window for vscode 😕

image

koutsenko commented 8 years ago

@bbenoist right button mouse click on conemu tabbar , "Attach to" feature, then pick already running app.

But it's not related to topic - it's about integrating console to vscode, not the integrating app to conemu.

UPD I tried to split consoles and got same error...

bbenoist commented 8 years ago

@all People interested in running shell commands from current version of vscode (without any extra window) can take a look at Shell which is an small extension I built weeks ago.

@koutsenko I know its kind of off-topic but some could have been be interested it it anyway. #143 is about productivity when using both vscode and a terminal.

In that sense, I believe that ConEmu's splitting options and alternatives on other platforms such as Xmonad and Awesome are worth being notified to people :wink:

Sorry if some felt polluted by my question. I have opened an issue (#5941) to move the discussion around my problem out.

alexandermikuta commented 8 years ago

It would be nice if the integrated terminal could be configured, e.g. to ZSH

pflannery commented 8 years ago

@bbenoist I've written a gist for conemu here - https://gist.github.com/pflannery/8d28d1d5e17cc3b15ab5861639fa2e5a

wclr commented 8 years ago

waiting, fed up with webtorm nasty terminal.

Tyriar commented 8 years ago

Hi all, here is an update on the current state of the terminal and next steps.

The terminal can be triggered using ctrl+` or by triggering the View: Toggle Terminal command in the command palette. It should work on all platforms, there are a few caveats on Windows though.

Windows

Powershell

Windows defaults to use powershell, the reason for this is that cmd on Windows 10 does not work out of the box.

ps1

cmd

To get cmd to work on Windows 10 you need to open cmd, go to properties and check "Use legacy console".

cmd1

cmd2

Then add the settings value in VSCode:

"terminal.integrated.shell.windows": "cmd.exe"

cmd

The new Windows 10 cmd and by extension Windows 10 bash is not currently supported.

Linux & Mac

$SHELL is the default terminal on Linux and Mac, bash and zsh should both work, you can explicitly set this using the "terminal.integrated.shell.unixLike" configuration value.

linux_bash

linux_zsh

Version 1.2.0 and Insiders

The plan is to test and fix the bigger issues before this lands in the stable May release (v1.2.0), the issues big enough to be considered blockers are marked with integrated-terminal and important. It should land in the next insiders build.

If you find an issue once you start playing with the terminal, if you could do a cursory search on the integrated terminal tag first to help prevent duplicates that would be great. :+1: reactions on issues you experience and want fixed are also very useful!

Next steps

After the terminal lands and the major problems are ironed out, the next big thing I'd like to focus on is allowing multiple terminals at a time (#6458).

Thanks for your patience everyone, I'm going to close this issue as the basic terminal has landed :fireworks:

wclr commented 8 years ago

Then add the settings value in VSCode: "integratedTerminal.shell.windows": "cmd.exe"

How to do that?

Tyriar commented 8 years ago

@whitecolor F1, type "settings", enter should open your user settings.json file, you add it there.

wclr commented 8 years ago

Hm I added setting, mark use legacy terminal in cmd settings.

I press ctrl+ but it just jumps next tab. An I have noview` menu at all in the UI.

Tyriar commented 8 years ago

@whitecolor it will land in stable in early June and in the Insiders build in a few days.

wclr commented 8 years ago

ok, will it support multiple terminals per opened project?

Tyriar commented 8 years ago

@whitecolor only a single terminal per vscode windows in Stable, #6458 tracks multiple terminals.

AlexJuca commented 8 years ago

This feature should definitely be built. I was debugging some ruby code and I had to interact with the terminal to enter some input that the program needs and bam! No terminal for me to interact with.