PowerShell syntax color in Sublime Text

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.

Packages

When you have copied the folder to the Packages folder it will look like the screenshot below.

folder

Now when you open a .ps1 file you will see color syntax.

color

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,

BTW, here are two useful sites to help you get started with Sublime Text 3 – Visual Guide, and Tips, Tricks, and Shortcuts.

8/15/17 – Used this info with Sublime Stable Channel build 3126 and it worked perfect.

Michael

=== END ===

Tagged with:
Posted in How To

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: