Forum Discussion
Experimentalist
Sep 02, 2022Copper Contributor
Is there a PowerShell script previewer for file explorer in windows with syntax highlighting?
The subject says it all really, I do have a previewer but it is plain text and I would like to preview with syntax highlighting.
- raindropsdevIron Contributor
Haven't tested it, but the PowerToys File Explorer add-on seems to have syntax highlighting: https://learn.microsoft.com/en-gb/windows/powertoys/file-explorer
- Just tested it and yes, it does work 🙂 Have PowerToys installed, but never used the File Explorer preview. Just enable it and use ALT-P in File Explorer and select a PowerShell file... Nicely formatted too if you enabled the File Explorer Add-ons/Source Code (Monaco/Try for format the source preview option
- raindropsdevIron ContributorHappy to hear it works! Though considering the security risks of preview in explorer (the last one being Follina) I would personally never enable it or use it.
- Never saw a preview in the Windows Explorer, but Notepad++ is pretty light-weight when opening files and has syntax highlighting