Ⅰ. 插件描述
New version - everything indents correctlyⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/windows-powershell-indent-enhanced'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/windows-powershell-indent-enhanced'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/windows-powershell-indent-enhanced'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Windows-PowerShell-indent-enhanced
Ⅳ. 文档说明
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