setpwsh : A Vim plugin to improve powershell integration.
script karma |
Rating 4/1,
Downloaded by 28 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Miguel Barro |
|
script type |
utility |
|
description |
This package improves the powershell (core and desktop) integration as vim 'shell' using a set of scripts.
Repo: https://github.com/MiguelBarro/setpwsh
Having powershell core (windows or linux) or desktop available is a prerequisite.
There is only a single command:
:SetPwsh [Desktop | FtpFromWsl | SshFromWsl]
This command will modify the 'shell' and related options to use the
powershell. It admits the following argument flags that are only meaningful in windows:
+ Desktop Use powershell desktop instead of powershell core.
+ FtpFromWsl Sets up netrw global options to rig wsl ftp.
+ SshFromWsl Sets up netrw global options to rig wsl ssh & scp.
Usage examples:
:read !1..5 | \% { [char]($_+96) }
will fill the current buffer with:
1 a
2 b
3 c
4 d
5 e
Is possible to use filter commands to modify the buffer. The plugin allows creating powershell filters where the buffer input is translated into a powershell pipeline input. The $_ automatic variable will match each input line. For example in the above buffer doing:
:1,5!"-->$_<--"
will turn the buffer into:
1 -->a<--
2 -->b<--
3 -->c<--
2 -->d<--
5 -->e<--
|
|
install details |
> Installation is as easy as sourcing the vimball file:
:source setpwsh.vba
so is uninstall:
:RmVimball setpwsh.vba
> The github repo can be cloned direcly into the $VIMRUNTIME/pack directory as explained in matchit-install. Though using this approach many useless files in this repo will be installed too.
> Use getscript plugin to automatically download an update it. Update the local
$VIMRUNTIME/GetLatest/GetLatestVimScripts.dat adding a line associated with this plugin.
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.23.101.91
|