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

# Web Links 11.26.2006 « Rhonda Tipton’s WebLog

Sunday, November 26, 2006 7:08 PM by Web Links 11.26.2006 « Rhonda Tipton’s WebLog

# 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 syntax highlighting for SciTE?

The only thing about scite i know is, it is scintilla based as Notepad++ is. If syntax definitions are

Thursday, July 19, 2007 1:59 PM by Latest Newsgroup Posts

# re: PowerShell Language Definitions for Notepad++

Thanks!  Very cool :-)

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

# Powershell auto-completion for Notepad++ « Consistency Check

Pingback from  Powershell auto-completion for Notepad++ « Consistency Check

# re: PowerShell Language Definitions for Notepad++

The link's dead!

Saturday, July 26, 2008 11:29 PM by Anan

# 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

# Twitter Trackbacks for PowerShell Language Definitions for Notepad++ - Jon Galloway [asp.net] on Topsy.com

Pingback from  Twitter Trackbacks for                 PowerShell Language Definitions for Notepad++ - Jon Galloway         [asp.net]        on Topsy.com

Leave a Comment

(required) 
(required) 
(optional)
(required)