Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Configure VS Code keybinding to open a new Powershell script?

$
0
0

I have the MS Powershell extension installed in VS Code. Other language extensions, e.g. Python, have the ability to assign a keybinding for creating a new file (python.createNewFile). I don't see this option in the Powershell extension. There isn't even an option with Ctrl-Shift-P.

EDIT:Expanding on the Python example, using a keybinding sequence for python.createNewFile will create a new file that already has Python syntax highlighting defined. I don't have to create the file, then save it with a .py extension to achieve this. I can get right into the scripting. I'd like to be able to do the same with Powershell.

The only options I have at the moment are to Ctrl + N, Ctrl + S, and give it a file name with a .ps1 extension, or Ctrl + N and choose "Powershell" from the Select a Language list.

Is there another way to do this? A macro or something? There are other Powershell extensions, but as far as I can tell the only way to know the abilities they provide, is to install each one.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>