using crazy padding as example input
I call it modern
, but it fully works on PS5.1 without changes!
In the examples below, if you add a using namespace
statement, you can remove Systems.Collections.Generic
tip: System
is always included, so you can omit that prefix anywhere as well.
using namespace system.collections.generic
[List[Object]]$users = @()
// Generated by Generate-CodepointWidthsFromUCD.ps1 -Pack:True -Full: -NoOverrides:False | |
// on 2023-05-12 05:07:14Z from Unicode 15.0.0. | |
// 321149 (0x4E67D) codepoints covered. | |
// 240 (0xF0) codepoints overridden. | |
// Override path: G:\my🍴\microsoft🧑\terminal\src\types\unicode_width_overrides.xml | |
static constexpr std::array<UnicodeRange, 297> s_wideAndAmbiguousTable{ | |
UnicodeRange{ 0xa1, 0xa1, 1 }, | |
UnicodeRange{ 0xa4, 0xa4, 1 }, | |
UnicodeRange{ 0xa7, 0xa8, 1 }, | |
UnicodeRange{ 0xaa, 0xaa, 1 }, |
Difference may have been an implicit import, aliasing to the other write-host
. Compare with:
Trace-Command -PSHost -Name ParameterBinding -Expression { Microsoft.PowerShell.Utility\Write-Host $($checkBox.Text) is checked } -Verbose
Trace-Command -PSHost -Name ParameterBinding -Expression { pansies\Write-Host $($checkBox.Text) is checked } -Verbose
Trace-Command -PSHost -Name ParameterBinding -Expression { Pipeworks\Write-Host $($checkBox.Text) is checked } -Verbose
Import-Module PipeScript -PassThru | out-null | |
Export-Pipescript -InputPath '*.ps.md' | |
# this runs powershell in the markdown file ./GhRepoSummary.ps.md | |
# outputting a raw text markdown file |
Default settings in VS Code are dynamic. They are generated based on your extensions's metadata. That means they are up to date. I have some tips for discovering new settings in Vs Code through Default settings (ninmonkeys.com)
Another extension that helps is Better Align
The main settings:
{ "powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.alignPropertyValuePairs": true,
I almost always have multiple windows up. My config will
if I use the file -> exit
menu,
- all windows close
- It quits without prompting for unsaved files
- the next time I open it all windows are restored including never-saved-files
If I click X
on a window to close it