visual studio open mac from desde code change cambiar abrir visual-studio-code preference

visual studio code - open - Cómo cambiar la terminal integrada en el código visual studio o VSCode



visual studio code change configuration (5)

Quiero cambiar la terminal integrada a CMDER uso Vscode en Windows 8.1. Comprobé el archivo de doc y también el de preferencias, pero me confundí de las siguientes líneas, qué línea lo cambiará.

// Terminal externo

// Customizes which terminal to run on Windows. "terminal.external.windowsExec": "%COMSPEC%", // Customizes which terminal application to run on OS X. "terminal.external.osxExec": "Terminal.app", // Customizes which terminal to run on Linux. "terminal.external.linuxExec": "xterm",

// Terminal integrado

// The path of the shell that the terminal uses on Linux. "terminal.integrated.shell.linux": "sh", // The command line arguments to use when on the Linux terminal. "terminal.integrated.shellArgs.linux": [], // The path of the shell that the terminal uses on OS X. "terminal.integrated.shell.osx": "sh", // The command line arguments to use when on the OS X terminal. "terminal.integrated.shellArgs.osx": [], // The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:/Windows/sysnative over C:/Windows/System32 to use the 64-bit versions. "terminal.integrated.shell.windows": "C://Windows//system32//cmd.exe", // The command line arguments to use when on the Windows terminal. "terminal.integrated.shellArgs.windows": [], // Controls the font family of the terminal, this defaults to editor.fontFamily''s value. "terminal.integrated.fontFamily": "", // Controls whether font ligatures are enabled in the terminal. "terminal.integrated.fontLigatures": false, // Controls the font size in pixels of the terminal, this defaults to editor.fontSize''s value. "terminal.integrated.fontSize": 0, // Controls the line height of the terminal, this number is multipled by the terminal font size to get the actual line-height in pixels. "terminal.integrated.lineHeight": 1.2, // Controls whether the terminal cursor blinks. "terminal.integrated.cursorBlinking": false, // Controls whether locale variables are set at startup of the terminal, this defaults to true on OS X, false on other platforms. "terminal.integrated.setLocaleVariables": false, // A set of command IDs whose keybindings will not be sent to the shell and instead always be handled by Code. This allows the use of keybindings that would normally be consumed by the shell to act the same as when the terminal is not focused, for example ctrl+p to launch Quick Open. "terminal.integrated.commandsToSkipShell": [ "editor.action.toggleTabFocusMode", "workbench.action.debug.continue", "workbench.action.debug.restart", "workbench.action.debug.run", "workbench.action.debug.start", "workbench.action.debug.stop", "workbench.action.quickOpen", "workbench.action.showCommands", "workbench.action.terminal.clear", "workbench.action.terminal.copySelection", "workbench.action.terminal.focus", "workbench.action.terminal.focusNext", "workbench.action.terminal.focusPrevious", "workbench.action.terminal.kill", "workbench.action.terminal.new", "workbench.action.terminal.paste", "workbench.action.terminal.runSelectedText", "workbench.action.terminal.scrollDown", "workbench.action.terminal.scrollDownPage", "workbench.action.terminal.scrollToBottom", "workbench.action.terminal.scrollToTop", "workbench.action.terminal.scrollUp", "workbench.action.terminal.scrollUpPage", "workbench.action.terminal.toggleTerminal" ],


De los documentos oficiales

La configuración correcta de su shell en Windows es una cuestión de localizar el ejecutable correcto y actualizar la configuración. A continuación se muestra una lista de ejecutables de shell comunes y sus ubicaciones predeterminadas.

También está el comando de conveniencia Seleccionar el Shell predeterminado que se puede acceder a través de la paleta de comandos que puede detectarlo y configurarlo por usted.

Para que pueda abrir una paleta de comandos usando ctrl+shift+p , use el comando Seleccionar Shell predeterminado , luego muestra todas las interfaces de línea de comando disponibles, seleccione lo que desee, el código VS lo configura automáticamente como terminal integrado predeterminado.

Si desea configurarlo manualmente, busque la ubicación del ejecutable de su cli y abra las configuraciones de usuario de vscode ( ctrl+, ) y luego configure

"terminal.integrated.shell.windows":"path/to/executable.exe"

Ejemplo para gitbash en windows7:

"terminal.integrated.shell.windows":"C://Users//stldev03//AppData//Local//Programs//Git//bin//bash.exe",


Es posible hacer que esto funcione en VS Code y tener el terminal Cmder integrado (no emergente).

Para hacerlo:

  1. Cree una variable de entorno "CMDER_ROOT" apuntando a su directorio Cmder.
  2. En (Preferencias> Configuración de usuario) en el Código VS, agregue las siguientes configuraciones:

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

"terminal.integrated.shellArgs.windows": ["/k", "%CMDER_ROOT%//vendor//init.bat"]


La forma oficial se describe en los documentos del Código VS , que es similar a la respuesta de khernands.

Si no quiere configurar CMDER_ROOT como una variable de entorno global, puede hacerlo en este archivo por lotes. Además, el cd en el directorio de trabajo actual al final resolvió un problema de ruta para mí.

Sin embargo, encontré una limitación con CMDER como terminal integrado predeterminado: no funciona si desea ejecutar tareas a través de Command Pallette -> comando "Ejecutar tarea" de VS IU de código (como "Ejecutar tarea de compilación"). Más sobre esto here y here .

En este caso, simplemente configure el shell para la tarea específica:

"tasks": [ { "type": "typescript", "tsconfig": "tsconfig.json", "problemMatcher": [ "$tsc" ], "options": { "shell": { "executable": "cmd.exe", "args": [ "/d", "/c" ] } } } ]


Para cambiar el terminal integrado en Windows, solo necesita cambiar la línea terminal.integrated.shell.windows :

  1. Abra la configuración de usuario de VS (Preferencias> Configuración de usuario). Esto abrirá dos documentos uno al lado del otro.
  2. Agregue una nueva configuración "terminal.integrated.shell.windows": "C://Bin//Cmder//Cmder.exe" al documento de configuración de usuario a la derecha si no está ya allí. Esto es para que no edite la Configuración predeterminada directamente, sino que la agregue.
  3. Guarde el archivo de Configuraciones de usuario.

A continuación, puede acceder a él con las teclas Ctrl + Backtick de forma predeterminada.


Sé que es tarde, pero puede lograrlo rápidamente simplemente presionando Ctrl + Shift + p y luego escriba default, se mostrará una opción que dice

Terminal: Seleccionar Shell predeterminado

, entonces mostrará todos los terminales disponibles para usted.