I like to edit PowerCLI or PowerShell scripts on my Mac. And of course I want syntax coloring like I get in NotePad++ in Windows. Here is how I do that.
Download Sublime Text here. It is beta but that has not caused me any issues. Now download the PowerShell package here. Once downloaded extract it. Now copy the folder and paste it in ~/Library/Application Support/Sublime Text 3/Packages. You can open this folder automatically by using Sublime Text \ Preferences \ Browse Packages.
When you have copied the folder to the Packages folder it will look like the screenshot below.
Now when you open a .ps1 file you will see color syntax.
Looks nice right? Notice at the bottom right corner where it says Powershell v2? That is a button you can push to change the type of interpretation if necessary.
I hope that this helps,
8/15/17 – Used this info with Sublime Stable Channel build 3126 and it worked perfect.
=== END ===