PowerShell syntax highlighting
-
After posting this https://notepad-plus-plus.org/community/topic/15675/powershell-syntax-highlighting/1 - I ran more tests and had others do the same. I’ve now installed every version of Notepad++ from 7.4.2 up to 7.5.8, on 27 different computers and virtual machines, running Windows 10 x64 Enterprise. Color highlighting for .ps1 files only works for the following style themes: HotFudgeSunday, Kakhi, MossyLawn, Navajo, Obisidian, Plastic Code Wrap, Solarized Light, Solarized, and ZenBurn. So this appears to be an issue with the style themes and not the language config file.
-
I’d love to have PS1 highlighting in N++. I’ve noticed SublimeText doesn’t have PS1 highlighting as well. I’m stuck on the Deep Black theme, but I like Monokai as well.
-
What is preventing you from creating it?
Cheers
Claudia -
Can You upload that files for PS? In switch prog lang i have PS, but in sett`s of style I cant see string PowerShell…
-
For what it’s worth… I have been running NP++ in Dark Mode and not getting any syntax highlighting for PS1 files. I don’t know what made me do this but I turned off Dark Mode and then got syntax highlighting. I turned Dark Mode back on and the syntax highlighting is still there!!! I’ll have to see if it stays working after a reboot.
-
I’m reviving an old post as when I searched for “PowerShell highlight”, this here was the youngest post.
We’re in 2025, after dozens of updates and I still no highlights in PS files apart from the few listed in the OP. I’m N*x so I’m Vim. No PS highlights in VIM Dark Blue.
I figured it out.
In AppData\Roaming\Notepad++\stylers.xml, there is a PS section.
I just copied that section to the AppData\Roaming\Notepad++\themes\vim Dark Blue.xml. Which was my goal, PS in VIM (I’m gonna hurl) …carefully pasting it where it was between “postscript” and “props”.
Just copy that same section to your favorite Theme!The colors were all shot up but they can be easily adjusted in the Style Configurator:
Thank you and HF !
-
@Netweezurd said in PowerShell syntax highlighting:
We’re in 2025, after dozens of updates and I still no highlights in PS files apart from the few listed in the OP.
The Notepad++ developer only updates the
stylers.model.xml
andthemes\DarkModeDefault.xml
– he expects volunteers from the userbase to submit updates to the other themes. That’s the way it was in 2018, and that’s the way it is in 2025. When I have added languages to the Notepad++ codebase, I’ve made dummy entries in all the themes, but that’s only been a handful of the dozens of languages that have been added over time since the various themes were submitted.If you are willing to use the PythonScript plugin, I have a script for that plugin which will add all the missing languages to all your themes (grabbing the default colors from the theme for any new languages or new styles in an existing language – so it won’t look highlighted, but it won’t look bad); see Config Files Need Updating, Too for full details.
No PS highlights in VIM Dark Blue.
Indeed. As that’s not the
stylers.model.xml
northemes\DarkModeDefault.xml
, it’s unsurprising that it’s not updated.The colors were all shot up but they can be easily adjusted in the Style Configurator:
Now that you’ve got a good set of colors for PS in the
vim Dark Blue
theme, you should consider submitting your update to the main repo, so that it will be bundled with future versions of Notepad++.