Skip to content

JayDoubleu/vim-pwsh-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Poor man's vim powershell code formatter.

Resources

Stars

Watchers

Forks

Packages

No packages published