In Visual Studio Code, how do you enter a click into an integrated terminal?

I've used clink with ConEmu for various node related tasks on Windows, but now I'm trying to execute Visual Studio Code.

How do I add a wedge to the integrated terminal of Visual Studio Code so that I can keep persistent command history between sessions, incremental history search, etc.?

With ConEmu I could add a click by dropping the click folder into the specified pickup directory.

I tried using the path to the included bat clink and clink exe in the VS Code setup terminal.integrated.shell.windows

, but they show up and then immediately close the command line shell.

Thank!

+3


source to share


2 answers


I found that you can pass arguments to the integrated wrapper in Visual Studio Code. Combined with the cmd.exe / K option, which executes the command indicated by the line but remains, a click can be entered.

In VS Code go to File> Preferences> Preferences or use Ctrl ,

and add preferences:



"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\path\\to\\clink\\clink_x64.exe inject"]

      

This is equivalent to opening a command prompt on Windows and running clink_x64 inject

.

+11


source


This is not an answer to your question, but there is another trick to see cmder and text editor in the same window. You can open your text editor as another tab in cmder, which I described here:

https://medium.com/@WMorkowski/protip-integrating-cmder-with-text-editor-7f08a6e76de7



from the article:

  • Run the command.
  • Go to Settings -> Run -> Environment
  • Type: set EDITOR_PATH = C: \ Program Files (x86) \ Microsoft VS Code \ Code.exe alias editor = "% EDITOR_PATH%" $ 1 -new_console: s50V Where on the first line you have to enter the path to the text editor (I was testing it on Visual Studio Code and Sublime, but it should work with other editors).
  • Save settings
  • Enter the editor command on the command line.

Wow! We're almost done. But in most cases, you don't need a console tab to dock to the top of the window. You have to close the console tab, and open it again, paying attention to "New console split at the bottom" and select the desired console type. Now that you finally set everything up, you should go to Preferences -> Launch and check the "Automatically save / restore open tabs" box to save our new workflow. Now every time you run cmder your tabs setup will be restored.

+1


source







All Articles