Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

If you like Notepad++ for editing PowerShell scripts

2,412 views
Skip to first unread message

Jason Fossen

unread,
Jul 17, 2009, 6:48:29 PM7/17/09
to
If anyone wants it, here's a script which queries the cmdlets, parameters,
aliases and other things in PowerShell in order to generate the files
Notepad++ uses to define color syntax highlighting and auto-completion of
PowerShell scripts. If you already have other custom language definitions
in your userDefineLang.xml file, they won't be overwritten. Hopefully you
won't have to copy-and-paste static XML files by hand anymore for PowerShell
support in Notepad++, the script will create and update them for you
automatically, e.g., after upgrading to PowerShell 2.0, just re-run the
script to get the 2.0-related keywords.

I'm sure the script has bugs/shortcomings I couldn't find, so please let me
know if you find one, but if you want change the fonts and colors assigned
by the script, please edit the script youself (easy to see where, the script
isn't that long). Cheers

https://blogs.sans.org/windows-security/2009/07/17/powershell-syntax-highlighting-auto-completion/

And Notepad++ can be downloaded for free of course from
http://notepad-plus.sourceforge.net


Joel Bennett

unread,
Jul 18, 2009, 12:38:27 AM7/18/09
to
I think you really, really want to use ...
http://PoshCode.org/notepad++lexer

Although you might still want this script to update the xml file,
because you can *add* things (like aliases or verbs that aren't built
into the lexer already)...
--
Joel

Mark D. MacLachlan

unread,
Jul 18, 2009, 12:48:23 AM7/18/09
to
Jason Fossen wrote:

I just gave it a try and it works great. Thanks for sharing!

--

@nospam.com Jason Fossen

unread,
Jul 18, 2009, 6:32:56 AM7/18/09
to
Thank you, I'll check it out!


0 new messages