PowerShell Language Definitions for Notepad++ - Jon Galloway

PowerShell Language Definitions for Notepad++

 I saw a request on the Notepad++ forums today to add PowerShell syntax support. Notepad++ has a pretty good extension system for adding user defined languages, so I went ahead and put on together. You can grab it from the Notepad++ download area (zip download). Installation information is in the included readme file - you extract the zip, rename a file, and drop it in your %APPDATA%\Notepad++\ directory.1

I've submitted a patch to get it included in a future Notepad++ release. The patch has been accepted; it's available for download from the Notepadd++ site.

The PowerShell API is very discoverable - you can get a list of all supported PowerShell commands by running the command "get-command" with no parameters. Similarly, you can get a list of all command aliases by typing "get-alias". I also threw in all the standard WMI classes and the basic PowerShell operators and syntax based on the online documentation. You can read my walkthrough of adding a User Defined Language to Notepad++ if you'd like more info on the process involved.

I'm thinking this might be helpful for occasional quick edits. For a real PowerShell editor, I highly recommend PowerShell Analyzer.

 

1The only gotcha there is if you've already added a user defined language for Notepad++, in which case you'll need to merge the files.
 

Published Saturday, November 25, 2006 3:32 PM by Jon Galloway

Comments

# re: PowerShell Language Definitions for Notepad++

Very nice.  Thanks a lot!  I reversed the colour of the comments, didn't like the white on green background.  

Wednesday, January 24, 2007 10:19 PM by Nik Coughlin

# re: PowerShell Language Definitions for Notepad++

Thanks!  Very cool :-)

Thursday, March 27, 2008 8:02 PM by Richard Banks

# re: PowerShell Language Definitions for Notepad++

Very nice color addon.

But. I very missed function and cycles collapsing ability of Notepad++, so we have to wait to full support of Powershell in Notepad++.

Tuesday, October 28, 2008 6:12 AM by Oleg Medvedev

# re: PowerShell Language Definitions for Notepad++

This PowerShell Language Definitions no longer work on Notepad++ v5.1.4, it just close the file when open .ps1 script.

Monday, January 19, 2009 9:45 PM by Samson

# re: PowerShell Language Definitions for Notepad++

Works fine in Notepad++ 5.2

Thursday, February 26, 2009 2:26 PM by James

# re: PowerShell Language Definitions for Notepad++

Thanks, good stuff!

Thursday, April 29, 2010 2:16 PM by Yannick

# re: PowerShell Language Definitions for Notepad++

Stopped working with 5.8.5? Anyone else had the problem?

Wednesday, December 22, 2010 4:05 AM by Sloc