Skip to content
2008/05/08 / Koen Vermoesen

Powershell auto-completion for Notepad++

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.

Advertisement

6 Comments

Leave a Comment
  1. Phil / May 9 2008 15:38

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

  2. k0v3 / May 9 2008 16:36

    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

  3. k0v3 / Nov 30 2009 14:36

    It looks like the latest version of Notepad++ (v 5.6) has Powershell support builtin:

    Add COBOL, D, Gui4Cli, PowerShell and R language support.

  4. autos / Mar 31 2011 12:02

    Ik heb blog.koenvermoesen.be gevonden via startpagina Gaaf gemaakt! Ik hoop zelf ook zo een template gebruiken.
    Hoe heb je dit gemaakt?

    Groetjes,
    Deb

    • Koen Vermoesen / Apr 1 2011 11:54

      Beste Debby,

      Het gaat hem om het INove theme, wat standaard beschikbaar is voor een WordPress.com blog.

      mvg,

      Koen

Trackbacks

  1. Writing a PowerShell script: What’s the right tool for the job? « brain | get-content

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 86 other followers