I was using clink with ConEmu for various node related tasks on windows, but now I'm trying Visual Studio code.
How do I inject clink into Visual Studio Code's integrated terminal, so that I can get real command history persistence between sessions, incremental history search, etc.?
With ConEmu I could inject clink by dropping the clink folder into a specified pickup directory.
I've tried using the path to the included clink bat file, and the clink exe in the VS Code setting terminal.integrated.shell.windows
but these spawn and then close the command shell immediately.
Thanks!
I discovered that you can pass arguments to the integrated shell in Visual Studio Code. Combined with the cmd.exe /K option which Carries out the command specified by string but remains, clink can be injected.
In VS Code, go to File > Preferences > Settings or use Ctrl ,
and add the settings:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\path\\to\\clink\\clink_x64.exe inject"]
This is the equivalent of opening a command prompt in Windows, and running clink_x64 inject
.
It is not answer for your question, but there is another trick to see cmder and text editor in one 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 article:
- Run your cmder.
- Go to ‘Settings -> Startup -> Environment’
- Type: set EDITOR_PATH=C:\Program Files (x86)\Microsoft VS Code\Code.exe alias editor="%EDITOR_PATH%" $1 -new_console:s50V Where in the first line you should type path to your text editor (I was testing it on Visual Studio Code and Sublime, but it should work with other editors).
- Save your settings
- Type ‘editor’ command in command line.
Whoa! We almost finished. But in most cases you don’t want console tab to be attached to the top of the window. You should close console tab, and open it again, paying attention to check “New console split to bottom” checkbox and choose the right console type. Now when you finally set everything up, you should go to ‘Settings -> Startup’, and check “Auto save/restore opened tabs” checkbox to save our new workflow. Now every time you run cmder, your tabs setup will be restored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With