Skip to content

Commit 7f9cb43

Browse files
keith-hallmichaelblyons
authored andcommitted
Add indentation rules and test
1 parent 8b530af commit 7f9cb43

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Indentation.tmPreferences

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Indentation Rules</string>
7+
<key>scope</key>
8+
<string>source.powershell</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>unIndentedLinePattern</key>
12+
<string>"@</string>
13+
</dict>
14+
</dict>
15+
</plist>

Tests/syntax_test_reindent.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SYNTAX TEST reindent "Packages/PowerShell/PowerShell.sublime-syntax"
2+
Function Get-ForegroundWindow {
3+
Add-Type @"
4+
using System; using System.Runtime.InteropServices; public class ClassGetForegroundWindow {
5+
[DllImport("user32.dll")]
6+
public static extern IntPtr GetForegroundWindow();
7+
}
8+
"@
9+
10+
return [ClassGetForegroundWindow]::GetForegroundWindow()
11+
}
12+
13+
Get-ForegroundWindow

0 commit comments

Comments
 (0)