Visual Studio Code - Change inline braces in snippets to newline braces


You’re a monster like me and have standardised on newline braces in PowerShell, but the vscode PowerShell extension has used inline braces.


  • Copy the snippets you use from %userprofile%\.vscode\extensions\ms-vscode.powershell-1.5.1\snippets\PowerShell.json
  • Add them to your user snippets for PowerShell (CTRL+SHIFT+P > Open User Snippets > PowerShell)
  • CTRL+F, regex mode
  • Find \{",
  • Replace with ",\n\t\t\t"{",


  • CTRL+, to open user settings, then add "editor.snippetSuggestions": "top"
  • Note: there are PowerShell user settings for code formatting, but I found these didn’t apply to snippets. Probably good to bang "powershell.codeFormatting.preset": "Allman" into there anyway
  • Save all and you’re good to go!


Hey, do you like videogames? If so please check out my game Grab n' Throw on Steam, and add it to your wishlist. One gamemode is like golf but on a 256 km^2 landscape, with huge throw power, powerups, and a moving hole. Another is like dodgeball crossed with soccer except instead of balls you throw stacks of your own teammates. And there's plenty more!

See full gameplay on Steam!