Sublime Forum

Noob needs help using syntax highlighting on OSX

#1

I’ve got sublime text 2 on OSX.

I would love to add powershell syntax highlighting.
I found some on github with zero documentation.

Do I just make a folder called powershell and put the get hub files there?
do I need to tell sublime to look in that folder and associate it with a ps1 extension?

Lastly, I noticed with a new file that syntax highlighting didn’t seem to work until I saved the file - is there a way to tell sublime “Treat this file as ___” (could be PHP, C# whatever)

Thanks in advance for the help!

  • Jack
0 Likes

#2
  1. Yep. Just make a folder called Powershell and put the files in there. Sublime will automatically scan all the folders in the Packages directory.

  2. Open the command palette (Tools > Command Palette or shift+command+p) and type “set syntax powershell” or click in the right of the status bar where by default it says “Plain text” and a menu should appear with syntaxes to select.

0 Likes

#3

Or use Package Control : wbond.net/sublime_packages/package_control

Go to wbond.net/sublime_packages/community and search for ‘powershell’

0 Likes