Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.05 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.05 KB

vim-pwsh-formatter

Poor man's vim powershell code formatter.

WRAPPER: Uses https://github.com/PowerShell/PSScriptAnalyzer Invoke-Formatter function to format buffer.

System Requirements:

pwsh -Command Install-Module -Name PSScriptAnalyzer

Installation:

vim-plug

  Plug 'JayDoubleu/vim-pwsh-formatter'

Usage :

From vim:

:PWSHFORMAT

Or map to key in your .vimrc or init.vim :

autocmd FileType ps1 noremap <F5> :PWSHFORMAT<CR>

Tweaking:

This is using default Invoke-Formatter settings. Edit plugin/format.ps1#L99-L100 and plugin/format.ps1#L17-L97 to customise.

Recommended plugins