sponsor Vim development Vim logo Vim Book Ad

vim-pwsh-formatter : Poor man's vim powershell code formatter.

 script karma  Rating 3/2, Downloaded by 464  Comments, bugs, improvements  Vim wiki

created by
Jay Doubleu
 
script type
syntax
 
description
Poor man's vim powershell code formatter.
https://github.com/JayDoubleu/vim-pwsh-formatter


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


System Requirements:

Powershell Core : https://github.com/PowerShell/PowerShell#get-powershell
PSScriptAnalyzer : https://github.com/PowerShell/PSScriptAnalyzer
pwsh -Command Install-Module -Name PSScriptAnalyzer


Usage :

From vim:

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

autocmd FileType ps1 noremap <F5> :PWSHFORMAT<CR>
 
install details
  Plug 'JayDoubleu/vim-pwsh-formatter'
 

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
vim-pwsh-formatter-1.0.zip v1.0 2019-07-07 7.0 Jay Doubleu Initial upload
ip used for rating: 216.73.216.46

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github