From bbf733b04f71f9296ff6212e9e4f03910575a564 Mon Sep 17 00:00:00 2001 From: God-damnit-all <53661808+God-damnit-all@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:38:59 -0600 Subject: [PATCH 1/3] Fix `$__` highlighting --- PowerShell.sublime-syntax | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index 1bc02fa3..fcc2d84a 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -1421,9 +1421,9 @@ variables: )\b var_language: |- (?xi: - [$^?_] + [$^?] | \b(?: - Args | ConsoleFileName | Error | Event | EventArgs + _ | Args | ConsoleFileName | Error | Event | EventArgs | EventSubscriber | ForEach | Input | LastExitCode | Matches | MyInvocation | NestedPromptLevel | PsBoundParameters | PsCmdlet | PsCulture | PsDebugContext | PsItem | Pwd | Sender | SourceArgs From 674fabb23ab753459067d0c2493a669b2b6c55bc Mon Sep 17 00:00:00 2001 From: God-damnit-all <53661808+God-damnit-all@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:02:10 -0600 Subject: [PATCH 2/3] Add `$PsNativeCommand` vars to syntax --- PowerShell.sublime-syntax | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index fcc2d84a..551417e4 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -1434,6 +1434,7 @@ variables: ) Preference | Maximum (?: Alias | Drive | Error | Function | History | Variable ) Count # Maximum*Count | Log (?: Command | Engine | Provider ) (?: Health | Lifecycle ) Event # Log*Event + | PsNativeCommand (?: ArgumentPassing | UseErrorActionPreference ) # PsNativeCommand* | PsDebugContext | PsDefaultParameterValues | PsEmailServer | PsModuleAutoloadingPreference | PsSenderInfo | PsSessionApplicationName | PsSessionConfigurationName From 52d78627e558934aa750fff88eb36de71d9f4073 Mon Sep 17 00:00:00 2001 From: God-damnit-all <53661808+God-damnit-all@users.noreply.github.com> Date: Tue, 9 Dec 2025 17:29:31 -0600 Subject: [PATCH 3/3] Group the $PsSession vars together --- PowerShell.sublime-syntax | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index 551417e4..93b2b3a4 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -1437,9 +1437,8 @@ variables: | PsNativeCommand (?: ArgumentPassing | UseErrorActionPreference ) # PsNativeCommand* | PsDebugContext | PsDefaultParameterValues | PsEmailServer | PsModuleAutoloadingPreference | PsSenderInfo - | PsSessionApplicationName | PsSessionConfigurationName - | PsSessionOption | ErrorView | FormatEnumerationLimit | OFS - | OutputEncoding + | PsSession (?: ApplicationName | ConfigurationName | Option ) # PsSession* + | ErrorView | FormatEnumerationLimit | OFS | OutputEncoding )\b ) var_scope_mod: (?i:global|local|private|script|using|workflow)