2016-11-08 16 views
23

Tôi muốn thay đổi thiết bị đầu cuối tích hợp thành CMDER tôi sử dụng Vscode trên windows 8.1 tôi đã kiểm tra tài liệu và tệp tùy chọn đó nhưng tôi đã nhầm lẫn . thay đổi nóLàm thế nào để thay đổi thiết bị đầu cuối tích hợp trong mã phòng thu trực quan hoặc VSCode

// ngoài ga

// 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", 

// Integrated ga

// 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" 
], 

Trả lời

24

Để thay đổi thiết bị đầu cuối tích hợp trên Windows, bạn chỉ cần thay đổi dòng terminal.integrated.shell.windows:

  1. mở VS User Settings (Preferences> User Settings). Thao tác này sẽ mở hai tài liệu cạnh nhau.
  2. Thêm cài đặt "terminal.integrated.shell.windows": "C:\\Bin\\Cmder\\Cmder.exe" mới vào tài liệu Cài đặt người dùng ở bên phải nếu tài liệu chưa có ở đó. Điều này là do đó bạn không phải chỉnh sửa Cài đặt mặc định trực tiếp mà thay vào đó, hãy thêm nó vào.
  3. Lưu tệp Cài đặt người dùng.

Sau đó bạn có thể truy cập nó với các phím Ctrl + backtick theo mặc định.

+1

nhờ xin vui lòng kiểm tra của tôi khác Q cũng –

+6

này vẫn bật ra ngoài cửa sổ Cmder thay vì nó được tích hợp – Martin

+3

@Martin Như được viết trong số này, https://github.com/Microsoft/vscode/issues/12006, vì Cmder là trình mô phỏng đầu cuối, nó không thể được tích hợp. Thay vào đó, bạn có thể sử dụng Clink. – mbernardeau

21

Có thể làm việc này trong Mã VS và có thiết bị đầu cuối Cmder được tích hợp (không bật lên).

Để thực hiện:

  1. Tạo một biến môi trường "CMDER_ROOT" trỏ đến thư mục Cmder của bạn.
  2. In (Preferences> User Settings) trong VS Mã thêm các cài đặt sau:

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

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

+4

Điều này hoạt động trên Windows 10, tuy nhiên tôi cần thay đổi dấu gạch chéo trong đường dẫn đối số:' ["/ k", " % CMDER_ROOT% \\ vendor \\ init.bat "]' – Lodybo

+0

Làm việc tuyệt vời với đề xuất của @ Lodybo. Cảm ơn! – Ben

+0

Lưu ý Tôi thực sự phải tạo một biến môi trường CMDER_ROOT. Nó không hoạt động để thay thế% CMDER_ROOT% trong tập tin cấu hình với đường dẫn đến init.bat – yoyoyoyosef

Các vấn đề liên quan