Vi Mode in PowerShell 🖥️
Vi Mode in PowerShell 🖥️
Motivation 🎯
On a daily basis, I use vim motions in many tools like VSCode, Cursor, JetBrains, etc. Recently, I discovered a way to use vim motions in PowerShell as well.
Installation ⚙️
First, you need to install the PsReadline
module:
1
Install-Module PsReadline -Scope CurrentUser
After installation, you can enable vim motions by executing:
1
Set-PSReadlineOption -EditMode vi
To avoid running this command every time, you can add it to your profile file. The profile file is located at the path stored in the $PROFILE
variable. You can edit it using the command notepad $PROFILE
and add Set-PSReadlineOption -EditMode vi
to the bottom of the file.
Usage ⌨️
You can now use vim motions while writing commands in PowerShell.
This post is licensed under CC BY 4.0 by the author.