Powershell auto-completion for Notepad++

2008 May 8
by k0v3

I’ve been working on a PowerShell auto-completion file for my favorite lightweight text-editor (Notepad++) as I couldn’t find one online: powershell.xml

Procedure:

  1. Install the PowerShell Language Definitions for Notepad++ (for syntax highlighting) and make sure it’s working (this is a prerequisite).
  2. Save the the file above in “C:\Program Files\Notepad++\plugins\APIs”
  3. Make sure the language is set to powershell in your document.

npp language selection

Note: You might want to have a look at the Notepad++ Auto-completion HOWTO for more details about this feature.

The auto-complete features of npp are not the most powerful though. It seems to work perfectly if you hit CTRL+SPACE before the dash. If you try after the dash it seems to forget about the verb in a PS-cmdlet. Even the builtin languages like LISP sport the same behaviour. The underscore characters in the WMI-class names and the “about” pages do not pose a problem.

*Update 2009-01-29 Npp has switched to the xml format for the autocompletion files. I’ve uploaded an xml version of the previous file to some other webspace (= no renaming anymore) and update the post accordingly.

2 Responses leave one →
  1. 2008 May 9
    Phil permalink

    Yea downloading this file doesn’t work. can you compress the file as a zip and re upload it?

  2. 2008 May 9
    k0v3 permalink

    Phill,

    Zip files are also not allowed. This time I’ve simply added a .doc extension to the api file. So it’s not a real word document anymore. I’ve also rewritten part of my post to make it more clear on how to use the file. Can you give it another try?

    If it still doesn’t work, please provide a more detailed explanation of your problem.

    Koen

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS