sponsor Vim development Vim logo Vim Book Ad

Windows PowerShell indent (enhanced) : New version - everything indents correctly

 script karma  Rating 37/10, Downloaded by 1323  Comments, bugs, improvements  Vim wiki

created by
Lior Elia
 
script type
indent
 
description
PowerShell indentation script. Partially relying on the built-in cindent but fixing many PowerShell specific indentations like the comment problem (lines that begin with # were considered precompiler and were never indented) and extraneous indentation after a param() line or a line that ends with a .net function call.

Best used with the Windows PowerShell syntax and ftplugin files (vimscript #1327 and vimscript #1816)

Indentation should be perfect now.
If you happen to find anything that does not indent correctly - please comment on my blog post:
http://blogs.msdn.com/lior/archive/2009/10/18/powershell-indentation-for-vim-version-2-0.aspx
 
install details
Copy this file into your indent folder.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ps1.vim 2.0 2009-10-18 6.0 Lior Elia Fixed many things. Currently there are no open issues.
If you find something that doesn't indent correctly, please comment so that I can fix this. Also if you find this script useful please rate it.
ps1.vim 1.0 2009-10-04 6.0 Lior Elia Initial upload
ip used for rating: 18.117.196.217

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github