I’ve been using the all new Windows Terminal (Preview) from a few weeks now, and I definitely find it promising. In case you’ve not already used it you can download it from Microsoft Store or also from GitHub.
There were however a couple of things I found not available out of the box in the terminal
- Option to spawn Visual Studio Developer command prompt
- Ability to copy/paste text in the CLI using the default keyboard shortcuts
However, even though these were not pre-configured in the terminal, Microsoft has provided a configuration file, where you can configure and make these available for your use.
It’s fairly straight forward and this is how you can enable these…
Integrating the Visual Studio Developer command prompt
Once you install the terminal on Windows 10, and launch it, you’ll find the following default set of CLI’s supported.
You can open the configuration file by clicking on the Settings option in the menu. This will open up a
profiles.json file. You can scroll down to the
profiles section in the file where all the existing CLI’s are pre-configured. Just append the following configuration snippet to the existing list of profiles.
The path you use in the
commandline section will depend on the version of Visual Studio you are using. Also the
icon section will be a custom path where you have a visual studio icon. I downloaded this from the following site.
If all goes well, you will see an additional option in the menu for the Visual Studio Developer Command prompt with the custom icon.
When you click the new Visual Studio CLI option the CLI should load as follows …
Ability to copy/paste text in the CLI using default keyboard shortcuts
As you start using the terminal, you’ll notice that common options like copy/paste with the default key bindings
Ctrl+C/Ctrl+P don’t work as expected. The Settings menu suggests you use
Ctrl+Shift+C to copy selected text and
Ctrl+Shift+v to paste the text back from clipboard.
To get this working open the same Settings menu option as earlier that will load the
Scroll to the
keybindings section and append the json configuration below at the end of it.
When this step is done right,
- Highlighting/marking/selecting text on the CLI and pressing
Ctrl+Cwill copy the text
- Once copied, pressing
Ctrl+Pwill paste the text from clipboard to the target
- If no text is highlighted/marked/selected on the CLI, pressing
Ctrl+Cwill cancel the command.
Hope this was useful!!